pycommonlog 0.0.0__tar.gz → 0.1.0__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.
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/PKG-INFO +1 -1
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog.egg-info/PKG-INFO +1 -1
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/setup.py +18 -10
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/LICENSE +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/README.md +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog/__init__.py +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog/log_types.py +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog/logger.py +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog.egg-info/SOURCES.txt +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog.egg-info/dependency_links.txt +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/pycommonlog.egg-info/top_level.txt +0 -0
- {pycommonlog-0.0.0 → pycommonlog-0.1.0}/setup.cfg +0 -0
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
from setuptools import setup, find_packages
|
|
2
2
|
import subprocess
|
|
3
|
+
import os
|
|
3
4
|
|
|
4
5
|
def get_latest_git_tag():
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
# In GitHub Actions, use GITHUB_REF for release tags
|
|
7
|
+
if 'GITHUB_REF' in os.environ and os.environ['GITHUB_REF'].startswith('refs/tags/'):
|
|
8
|
+
tag = os.environ['GITHUB_REF'].replace('refs/tags/', '')
|
|
9
|
+
else:
|
|
10
|
+
try:
|
|
11
|
+
tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"]).decode().strip()
|
|
12
|
+
except Exception:
|
|
13
|
+
return "0.0.0"
|
|
14
|
+
|
|
15
|
+
# Clean up invalid version formats
|
|
16
|
+
if tag.startswith('v'):
|
|
17
|
+
tag = tag[1:] # Remove leading 'v'
|
|
18
|
+
if '-v' in tag:
|
|
19
|
+
# Extract base version from tags like 0.1.7-v24
|
|
20
|
+
base_version = tag.split('-v')[0]
|
|
21
|
+
return base_version
|
|
22
|
+
return tag
|
|
15
23
|
|
|
16
24
|
setup(
|
|
17
25
|
name="pycommonlog",
|
|
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
|