Skip to content
Snippets Groups Projects
Commit 1d61d024 authored by Blaise Li's avatar Blaise Li
Browse files

Update build settings.

Automatic version from git tags using setuptools-scm

See https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
and https://github.com/pypa/setuptools_scm/

Also adopting src-layout.
parent d85a0f6d
No related branches found
No related tags found
No related merge requests found
# See https://github.com/pypa/setuptools_scm/
# and https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[project]
name = "libsnp"
description = "Miscellaneous things to deal with SNP data."
authors = [
{name = "Blaise Li", email = "blaise.li@normalesup.org"}]
readme = "README.md"
#license = {text = "GNU GPLv3"}
license = {file = "COPYING.txt"}
requires-python = ">=3.8, <4"
dependencies = [
"pandas",
"pysam"
]
# computed from git tags by setuptools-scm
dynamic = ["version"]
[tool.setuptools_scm]
#version_file = "libsnp/_version.py"
[build-system]
requires = [
"setuptools",
"setuptools_scm[toml]",
"Cython",
]
build-backend = "setuptools.build_meta"
......@@ -12,29 +12,12 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from setuptools import setup, find_packages
#from setuptools import setup, find_packages
from setuptools import setup
#from Cython.Build import cythonize
# Adapted from Biopython
__version__ = "Undefined"
for line in open('libsnp/__init__.py'):
if (line.startswith('__version__')):
exec(line.strip())
setup(
name="libsnp",
#version=libworkflows.__version__,
version=__version__,
description="Miscellaneous things to deal with SNP data.",
author="Blaise Li",
author_email="blaise.li@normalesup.org",
license="GNU GPLv3",
packages=find_packages(),
install_requires=[
"pandas",
"pysam"]
##package_data={
## "libsnp": ["tests/data/jointcall_sample.vcf.gz"]},
)
#ext_modules = cythonize("libsnp/libsnp.pyx"),
#install_requires=["cytoolz"],
#zip_safe=False
from importlib.metadata import version, PackageNotFoundError
try:
#__version__ = version("package-name")
__version__ = version("libsnp")
except PackageNotFoundError:
# package is not installed
pass
__copyright__ = "Copyright (C) 2023 Blaise Li"
__licence__ = "GNU GPLv3"
__version__ = 0.1
from .libsnp import (load_counts_from_joint_vcf,)
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment