From 58ce3bfef645df4507acbf15a24e643ecd1aa6fe Mon Sep 17 00:00:00 2001 From: vgp57214_gsk Date: Mon, 12 Feb 2024 15:21:04 +0100 Subject: [PATCH] move setup.py to pyproject.toml for dynamic versioning --- MANIFEST.in | 1 + build.command | 19 ------------- pyproject.toml | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 63 ------------------------------------------- 4 files changed, 73 insertions(+), 82 deletions(-) delete mode 100755 build.command create mode 100644 pyproject.toml delete mode 100755 setup.py diff --git a/MANIFEST.in b/MANIFEST.in index d19eea89..1bb6661c 100755 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,6 +13,7 @@ include AUTHORS.txt include README.rst include requirements.txt include pymzml/utils/Moby_Dick_indexed.gz +include pyproject.toml prune docs/build/html/.doctrees/ prune compare diff --git a/build.command b/build.command deleted file mode 100755 index 8e156781..00000000 --- a/build.command +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -mkdir dist - -rm -rf docs/build/* -rm -rf dist/* - -# Evoke Sphinx to create html and pdf documentation -cd docs -make html -# make latexpdf -cd .. - - -# Creating Python packages -python setup.py sdist --formats=bztar,gztar,zip -# python3.4 setup.py sdist --formats=zip -cd dist -tar xvfj *.bz2 -cd .. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..03fc1ded --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,72 @@ +[dev-dependencies] +black = { version = "^18.3-alpha.0", python = "^3.7" } + +[build-system] +requires = [ + "setuptools>=45", + "setuptools_scm[toml]>=6.2" +] +build-backend = "setuptools.build_meta" + +[project] +name = "pymzml" +readme = "README.rst" +description = 'python module for high-throughput mzML parsing' +authors = [ + {name = "M.Koesters"}, + {name = "J.Leufken"}, + {name = "S.Schulze"}, + {name = "K.Sugimoto"}, + {name = "R.Zahedi"}, + {name = "M. Hippler"}, + {name = "C.Fufezan", email = 'christian@fufezan.net'}, +] +license = {text = 'The MIT license'} +dynamic = ["version"] +urls = { Source = "http://pymzml.github.com" } +classifiers = [ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Intended Audience :: Education', + 'Intended Audience :: Science/Research', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'Operating System :: POSIX :: SunOS/Solaris', + 'Operating System :: Unix', + 'Programming Language :: Python :: 3.5', + 'Topic :: Scientific/Engineering :: Bio-Informatics', + 'Topic :: Scientific/Engineering :: Chemistry', + 'Topic :: Scientific/Engineering :: Medical Science Apps.', +] +dependencies = [ + 'numpy >= 1.8.0', + 'regex', +] +[project.optional-dependencies] +full = [ + 'plotly<5.0', + 'pynumpress>=0.0.4', + 'ms_deisotope', +] +plot = [ + 'plotly<5.0' +] +pynumpress = [ + 'pynumpress>=0.0.4' +] +deconvolution = [ + 'ms_deisotope==0.0.14' +] + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["pymzml"] + +[tool.setuptools_scm] +write_to = "pymzml/_version.py" +local_scheme = "no-local-version" \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100755 index dcb1a922..00000000 --- a/setup.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python3 -from setuptools import setup -import os - -version_path = os.path.join( - os.path.dirname(__file__), - 'pymzml', - 'version.txt' -) -with open(version_path, 'r') as version_file: - pymzml_version = version_file.read().strip() - -setup( - name = 'pymzml', - version = pymzml_version, - packages = ['pymzml', 'pymzml.file_classes', 'pymzml.utils'], - package_dir = {'pymzml': 'pymzml'}, - package_data = { - 'pymzml': [ - 'version.txt', - 'obo/*.obo.gz' - ] - }, - python_requires = '>=3.7.0', - install_requires = [ - 'numpy >= 1.8.0', - 'regex', - ], - extras_require = { - 'full': [ - 'plotly<5.0', - 'pynumpress>=0.0.4', - 'ms_deisotope', - ], - 'plot': ['plotly<5.0'], - 'pynumpress': ['pynumpress>=0.0.4'], - 'deconvolution': ['ms_deisotope==0.0.14'] - }, - description = 'high-throughput mzML parsing', - long_description = 'pymzML - python module for mzML parsing', - author = 'M. Koesters, J. Leufken, S. Schulze, K. Sugimoto, R. Zahedi, M. Hippler and C. Fufezan', - author_email = 'christian@fufezan.net', - url = 'http://pymzml.github.com', - license = 'The MIT license', - platforms = 'any that supports python 3.7', - classifiers = [ - 'Development Status :: 4 - Beta', - 'Environment :: Console', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX', - 'Operating System :: POSIX :: SunOS/Solaris', - 'Operating System :: Unix', - 'Programming Language :: Python :: 3.5', - 'Topic :: Scientific/Engineering :: Bio-Informatics', - 'Topic :: Scientific/Engineering :: Chemistry', - 'Topic :: Scientific/Engineering :: Medical Science Apps.', - ] -)