mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
Build pip Post Releases from release branch
This commit is contained in:
parent
3974191ffa
commit
6091669e28
9
setup.py
9
setup.py
@ -35,13 +35,20 @@ def _patched_parse_manifests(self):
|
||||
# patch the parse_manifests function to point to the actual netgen cmake project within the superbuild
|
||||
skbuild.cmaker.CMaker._parse_manifests = _patched_parse_manifests
|
||||
|
||||
def is_dev_build():
|
||||
if 'NG_NO_DEV_PIP_VERSION' in os.environ:
|
||||
return False
|
||||
if 'CI_COMMIT_REF_NAME' in os.environ and os.environ['CI_COMMIT_REF_NAME'] == 'release':
|
||||
return False
|
||||
return True
|
||||
|
||||
git_version = check_output(['git', 'describe', '--tags']).decode('utf-8').strip()
|
||||
version = git_version[1:].split('-')
|
||||
if len(version)>2:
|
||||
version = version[:2]
|
||||
if len(version)>1:
|
||||
version = '.post'.join(version)
|
||||
if not 'NG_NO_DEV_PIP_VERSION' in os.environ:
|
||||
if is_dev_build():
|
||||
version += '.dev0'
|
||||
else:
|
||||
version = version[0]
|
||||
|
Loading…
Reference in New Issue
Block a user