File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed
Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change 11from setuptools import setup , find_packages
2+ import subprocess
23import codecs
34import os
45
5- VERSION = '0.0.1'
6+ #VERSION = '0.0.1'
7+ VERSION = (
8+ subprocess .run (["git" , "describe" , "--tags" ], stdout = subprocess .PIPE )
9+ .stdout .decode ("utf-8" )
10+ .strip ()
11+ )
12+
13+ if "-" in VERSION :
14+ # when not on tag, git describe outputs: "1.3.3-22-gdf81228"
15+ # pip has gotten strict with version numbers
16+ # so change it to: "1.3.3+22.git.gdf81228"
17+ # See: https://peps.python.org/pep-0440/#local-version-segments
18+ v ,i ,s = VERSION .split ("-" )
19+ VERSION = v + "+" + i + ".git." + s
20+
21+ # assert "-" not in cf_remote_version
22+ # assert "." in cf_remote_version
23+
24+ # assert os.path.isfile("cf_remote/version.py")
25+ # with open("cf_remote/VERSION", "w", encoding="utf-8") as fh:
26+ # fh.write("%s\n" % cf_remote_version)
27+
28+ # with open("README.md", "r", encoding="utf-8") as fh:
29+ # long_description = fh.read()
30+
631DESCRIPTION = 'A simple library for Python beginners'
732
833# Setting up
2348 "Operating System :: MacOS :: MacOS X" ,
2449 "Operating System :: Microsoft :: Windows" ,
2550 ]
26- )
51+ )
You can’t perform that action at this time.
0 commit comments