diff --git a/MANIFEST.in b/MANIFEST.in index 1d206dc896..a142c5c73e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,5 +12,5 @@ global-exclude *.rlib global-exclude *.orig global-exclude *.pyc global-exclude *.so -prune tests/test-data/ -global-exclude *.git/ +prune tests/test-data +global-exclude *.git diff --git a/pyproject.toml b/pyproject.toml index 90ef6610c6..b67af88f56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,13 @@ [build-system] requires = [ - "setuptools >= 40.0.4", - "setuptools_scm >= 2.0.0, <4", + "setuptools >= 42", + "setuptools_scm[toml] >= 3.4.0, <4", "setuptools_scm_git_archive", + "milksnake", "wheel >= 0.29.0", - "Cython >= 0.25.2", ] build-backend = 'setuptools.build_meta' + +[tool.setuptools_scm] +write_to = "sourmash/version.py" +git_describe_command = "git describe --dirty --tags --long --match v* --first-parent" diff --git a/setup.cfg b/setup.cfg index 2c18781810..96156d7458 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,86 @@ [metadata] -description-file = README.md -long-description-content-type = text/markdown +name = sourmash +description = tools for comparing DNA sequences with MinHash sketches +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/dib-lab/sourmash +author = C. Titus Brown +author_email = titus@idyll.org +license = BSD 3-clause +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Console + Environment :: MacOS X + Intended Audience :: Science/Research + License :: OSI Approved :: BSD License + Natural Language :: English + Operating System :: POSIX :: Linux + Operating System :: MacOS :: MacOS X + Programming Language :: Rust + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Topic :: Scientific/Engineering :: Bio-Informatics +project_urls = + Documentation = https://sourmash.readthedocs.io + CI = https://travis-ci.com/dib-lab/sourmash + +[options] +zip_safe = False +platforms = any +#packages = find: exclude=["tests", "benchmarks"] +packages = find: +include_package_data = True +install_requires = + screed>=0.9 + cffi>=1.14.0 + numpy + enum34; python_version < "3.4" + matplotlib + scipy + deprecation>=2.0.6 + +[options.packages.find] +exclude = + tests + benchmarks + +[bdist_wheel] +universal = 1 + +# for explanation of %(extra)s syntax see: +# https://github.com/pypa/setuptools/issues/1260#issuecomment-438187625 +# this syntax may change in the future +[options.extras_require] +test = + pytest + pytest-cov + recommonmark + hypothesis +demo = + jupyter + jupyter_client + ipython +doc = + sphinx + myst-parser[sphinx] + alabaster + sphinxcontrib-napoleon + nbsphinx + ipython +10x = + bam2fasta==1.0.4 +storage = + ipfshttpclient>=0.4.13 + redis +all = + %(test)s + %(demo)s + %(doc)s + %(10x)s + %(storage)s + +[options.entry_points] +console_scripts = + sourmash = sourmash.__main__:main diff --git a/setup.py b/setup.py index e6b61a6d95..ac992f3527 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ -from __future__ import print_function import os -from setuptools import setup, find_packages import sys +from setuptools import setup + DEBUG_BUILD = os.environ.get("SOURMASH_DEBUG") == "1" @@ -28,65 +28,6 @@ def build_native(spec): ) -CLASSIFIERS = [ - "Environment :: Console", - "Environment :: MacOS X", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: BSD License", - "Natural Language :: English", - "Operating System :: POSIX :: Linux", - "Operating System :: MacOS :: MacOS X", - "Programming Language :: Rust", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Topic :: Scientific/Engineering :: Bio-Informatics", -] - -CLASSIFIERS.append("Development Status :: 5 - Production/Stable") - -with open("README.md", "r") as readme: - LONG_DESCRIPTION = readme.read() - -SETUP_METADATA = { - "name": "sourmash", - "description": "tools for comparing DNA sequences with MinHash sketches", - "url": "https://github.com/dib-lab/sourmash", - "author": "C. Titus Brown", - "author_email": "titus@idyll.org", - "license": "BSD 3-clause", - "packages": find_packages(exclude=["tests", "benchmarks"]), - "entry_points": {'console_scripts': [ - 'sourmash = sourmash.__main__:main' - ] - }, - "install_requires": ['screed>=0.9', 'cffi>=1.14.0', 'numpy', - 'enum34; python_version < "3.4"', - 'matplotlib', 'scipy', 'deprecation>=2.0.6'], - "setup_requires": [ - "setuptools>=38.6.0", - "milksnake", - "setuptools_scm>=3.2.0", - "setuptools_scm_git_archive", - ], - "use_scm_version": { - "write_to": "sourmash/version.py", - "git_describe_command": "git describe --dirty --tags --long --match v* --first-parent" - }, - "zip_safe": False, - "platforms": "any", - "extras_require": { - 'test' : ['pytest', 'pytest-cov', 'recommonmark', 'hypothesis'], - 'demo' : ['jupyter', 'jupyter_client', 'ipython'], - 'doc' : ['sphinx', 'myst-parser[sphinx]', 'alabaster', - "sphinxcontrib-napoleon", "nbsphinx", - "ipython"], - '10x': ['bam2fasta==1.0.4'], - 'storage': ["ipfshttpclient>=0.4.13", "redis"] - }, - "include_package_data": True, - "classifiers": CLASSIFIERS, - "milksnake_tasks": [build_native], -} - -setup(**SETUP_METADATA) +setup( + milksnake_tasks=[build_native], +)