-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The pyproject.toml file is now the single location for the version to be declared. It will be read by __init__.py automatically. The old system used setuptools-scm but apparently that has the unintended side-effect of adding all files tracked by version control to the sdist! yikes Refer to pypa/setuptools-scm#190 for more details
- Loading branch information
Showing
3 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "trtools" | ||
version = "5.1.1" | ||
authors = [ | ||
{name = "Melissa Gymrek", email = "[email protected]"}, | ||
{name = "Gymrek Lab"}, | ||
|
@@ -20,6 +21,7 @@ classifiers = [ | |
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
] | ||
dependencies = [ | ||
"importlib-metadata", # required as long as we support py<3.8 | ||
"cyvcf2", | ||
"matplotlib", | ||
"numpy", | ||
|
@@ -31,16 +33,13 @@ dependencies = [ | |
"statsmodels", | ||
"pyfaidx", | ||
] | ||
dynamic = ["version"] | ||
|
||
[tool.setuptools] | ||
packages = ["trtools"] | ||
script-files = ["trtools/testsupport/test_trtools.sh", "scripts/trtools_prep_beagle_vcf.sh"] | ||
license-files = ["LICENSE.txt"] | ||
|
||
[tool.setuptools_scm] | ||
# generated automatically by setuptools when running pip install -e or python -m build | ||
version_file = "trtools/version.py" | ||
[tool.setuptools.packages.find] | ||
exclude = ["trtools.testsupport.*", "doc"] | ||
|
||
[project.scripts] | ||
dumpSTR = "trtools.dumpSTR:run" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
try: | ||
from .version import __version__ | ||
except ModuleNotFoundError: | ||
from importlib.metadata import version, PackageNotFoundError | ||
except ImportError: | ||
# handles py3.7, since importlib.metadata was introduced in py3.8 | ||
from importlib_metadata import version, PackageNotFoundError | ||
|
||
try: | ||
__version__ = version(__name__) | ||
except PackageNotFoundError: | ||
__version__ = "unknown" |