apdev 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apdev-0.2.2 → apdev-0.2.3}/PKG-INFO +1 -1
- {apdev-0.2.2 → apdev-0.2.3}/pyproject.toml +1 -1
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/__init__.py +1 -1
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/release.sh +45 -9
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev.egg-info/PKG-INFO +1 -1
- {apdev-0.2.2 → apdev-0.2.3}/README.md +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/setup.cfg +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/__main__.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/charsets/base.json +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/charsets/chinese.json +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/charsets/japanese.json +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/charsets/korean.json +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/check_chars.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/check_imports.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/cli.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/config.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev/py.typed +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev.egg-info/SOURCES.txt +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev.egg-info/dependency_links.txt +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev.egg-info/entry_points.txt +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev.egg-info/requires.txt +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/src/apdev.egg-info/top_level.txt +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/tests/test_check_chars.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/tests/test_check_imports.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/tests/test_cli.py +0 -0
- {apdev-0.2.2 → apdev-0.2.3}/tests/test_config.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "apdev"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.3"
|
|
8
8
|
description = "Shared development tools for Python projects - character validation, circular import detection, and more"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -203,22 +203,58 @@ step1_version_verification() {
|
|
|
203
203
|
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
204
204
|
|
|
205
205
|
PYPROJECT_VERSION=$(grep -E '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
|
|
207
|
+
# Locate __init__.py (src layout or flat layout)
|
|
208
|
+
INIT_FILE=""
|
|
209
|
+
if [ -f "src/${PACKAGE_NAME}/__init__.py" ]; then
|
|
210
|
+
INIT_FILE="src/${PACKAGE_NAME}/__init__.py"
|
|
211
|
+
SRC_ROOT="src"
|
|
212
|
+
elif [ -f "${PACKAGE_NAME}/__init__.py" ]; then
|
|
213
|
+
INIT_FILE="${PACKAGE_NAME}/__init__.py"
|
|
214
|
+
SRC_ROOT="."
|
|
215
|
+
fi
|
|
216
|
+
|
|
217
|
+
INIT_VERSION=""
|
|
218
|
+
INIT_DYNAMIC=false
|
|
219
|
+
if [ -n "$INIT_FILE" ]; then
|
|
220
|
+
# 1) Try dynamic import with local source on PYTHONPATH
|
|
221
|
+
INIT_VERSION=$(PYTHONPATH="${SRC_ROOT}:${PYTHONPATH:-}" python3 -c "from ${PACKAGE_NAME} import __version__; print(__version__)" 2>/dev/null)
|
|
222
|
+
# 2) Fallback: grep static __version__ = "x.x.x"
|
|
223
|
+
if [ -z "$INIT_VERSION" ]; then
|
|
224
|
+
INIT_VERSION=$(grep -E '^__version__ = ' "$INIT_FILE" 2>/dev/null | sed 's/__version__ = "\(.*\)"/\1/')
|
|
225
|
+
fi
|
|
226
|
+
# 3) If still empty, check if __init__.py uses dynamic versioning (importlib.metadata)
|
|
227
|
+
if [ -z "$INIT_VERSION" ]; then
|
|
228
|
+
if grep -qE 'importlib\.metadata|from importlib' "$INIT_FILE" 2>/dev/null; then
|
|
229
|
+
INIT_VERSION="$PYPROJECT_VERSION"
|
|
230
|
+
INIT_DYNAMIC=true
|
|
231
|
+
fi
|
|
232
|
+
fi
|
|
210
233
|
fi
|
|
211
234
|
|
|
212
235
|
echo -e " pyproject.toml: ${CYAN}${PYPROJECT_VERSION}${NC}"
|
|
213
|
-
|
|
236
|
+
if [ -z "$INIT_FILE" ]; then
|
|
237
|
+
echo -e " __init__.py: ${YELLOW}(not found, skipped)${NC}"
|
|
238
|
+
elif [ "$INIT_DYNAMIC" = true ]; then
|
|
239
|
+
echo -e " __init__.py: ${CYAN}${INIT_VERSION}${NC} (dynamic, from pyproject.toml)"
|
|
240
|
+
elif [ -n "$INIT_VERSION" ]; then
|
|
241
|
+
echo -e " __init__.py: ${CYAN}${INIT_VERSION}${NC}"
|
|
242
|
+
else
|
|
243
|
+
echo -e " __init__.py: ${YELLOW}(no __version__ defined, skipped)${NC}"
|
|
244
|
+
fi
|
|
214
245
|
echo -e " Script version: ${CYAN}${VERSION}${NC}"
|
|
215
|
-
|
|
216
|
-
if [ "$PYPROJECT_VERSION" != "$VERSION" ]
|
|
217
|
-
echo -e "${RED}❌ Version mismatch
|
|
246
|
+
|
|
247
|
+
if [ "$PYPROJECT_VERSION" != "$VERSION" ]; then
|
|
248
|
+
echo -e "${RED}❌ Version mismatch: pyproject.toml (${PYPROJECT_VERSION}) != script (${VERSION})${NC}"
|
|
249
|
+
return 1
|
|
250
|
+
fi
|
|
251
|
+
|
|
252
|
+
if [ -n "$INIT_VERSION" ] && [ "$INIT_VERSION" != "$VERSION" ]; then
|
|
253
|
+
echo -e "${RED}❌ Version mismatch: __init__.py (${INIT_VERSION}) != script (${VERSION})${NC}"
|
|
218
254
|
echo -e "${YELLOW}💡 Hint: Try 'pip install -e .' to sync the installed package version${NC}"
|
|
219
255
|
return 1
|
|
220
256
|
fi
|
|
221
|
-
|
|
257
|
+
|
|
222
258
|
echo -e "${GREEN}✅ All versions match${NC}"
|
|
223
259
|
echo ""
|
|
224
260
|
return 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|