mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
build: extract version number in setup.py from version.py
This commit is contained in:
parent
5c47188931
commit
0d02e4d4b9
3 changed files with 9 additions and 1 deletions
1
.github/workflows/pytest.yml
vendored
1
.github/workflows/pytest.yml
vendored
|
@ -40,6 +40,7 @@ jobs:
|
||||||
pip install pytest
|
pip install pytest
|
||||||
pip install pytest-cov
|
pip install pytest-cov
|
||||||
pip install pytest-benchmark
|
pip install pytest-benchmark
|
||||||
|
pip freeze
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest --cov=pyerrors -vv
|
run: pytest --cov=pyerrors -vv
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,3 +12,4 @@ core.*
|
||||||
htmlcov
|
htmlcov
|
||||||
build
|
build
|
||||||
pyerrors.egg-info
|
pyerrors.egg-info
|
||||||
|
dist
|
||||||
|
|
8
setup.py
8
setup.py
|
@ -1,10 +1,16 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from distutils.util import convert_path
|
||||||
|
|
||||||
this_directory = Path(__file__).parent
|
this_directory = Path(__file__).parent
|
||||||
long_description = (this_directory / "README.md").read_text()
|
long_description = (this_directory / "README.md").read_text()
|
||||||
|
|
||||||
|
version = {}
|
||||||
|
with open(convert_path('pyerrors/version.py')) as ver_file:
|
||||||
|
exec(ver_file.read(), version)
|
||||||
|
|
||||||
setup(name='pyerrors',
|
setup(name='pyerrors',
|
||||||
version='2.2.0+dev',
|
version=version['__version__'],
|
||||||
description='Error analysis for lattice QCD',
|
description='Error analysis for lattice QCD',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue