Skip to content

Commit

Permalink
Use pyproject.toml.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgautier committed Dec 30, 2023
1 parent cf56e64 commit b5f477a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 25 deletions.
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[build-system]
requires = [
"setuptools >= 61",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "mashing-pumpkins"
version = "0.3.0"
description = "Hash sketches of sequences"
readme = "README.md"
requires-python = ">=3.8"
license = { text = "MIT" }
authors = [{ name = "Laurent Gautier", email = "[email protected]" }]
classifiers = [
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C++',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering',
]
dependencies = [
]

[project.optional-dependencies]
test = ["pytest", "coverage", "pytest-cov"]

[project.urls]
Homepage = "https://lgautier.github.io/mashing-pumpkins"
Documentation = "https://lgautier.github.io/mashing-pumpkins/version/master/html/index.html"
Source = "https://github.com/lgautier/mashing-pumpkins"
Tracker = "https://github.com/lgautier/mashing-pumpkins/issue"

[tool.setuptools]
packages = [
"mashingpumpkins",
"mashingpumpkins.tests",
]
# zip_safe = false # not supported as of setuptools==62.3.2
41 changes: 16 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,8 @@

extra_compile_args = ['-pedantic']

CLASSIFIERS = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
]

if tuple(sys.version_info[:2]) < (3, 5):
print("Error: Python >= 3.5 is *required*.")
if tuple(sys.version_info[:2]) < (3, 8):
print("Error: Python >= 3.8 is *required*.")
sys.exit(1)

if sys.platform == 'darwin':
Expand Down Expand Up @@ -63,20 +50,24 @@
'-Wstrict-prototypes', '-Wundef'])

setup(
name = PYPINAME,
version = VERSION,
description = "Hash sketches of sequences",
license = "MIT",
author = "Laurent Gautier",
author_email = "[email protected]",
url = "https://github.com/lgautier/mashing-pumpkins",
packages = [PACKAGENAME,
PACKAGENAME + '.tests'],
package_dir = {PACKAGENAME: 'src'},
ext_modules = [mmh_mod, mmhmash_mod, xxh_mod],
extras_require = {
'test' : ['pytest']},
classifiers = CLASSIFIERS)
)




faf_mod = Extension('%s._fastqandfurious' % PACKAGENAME,
sources=['src/_fastqandfurious.c', ],
#depends=['src/.h'],
#include_dirs=['src',],
language='c',
extra_compile_args=(extra_compile_args +
['-O3', '-std=c99']))

setup(
package_dir = {PACKAGENAME: 'src'},
ext_modules = [faf_mod, ]
)

0 comments on commit b5f477a

Please sign in to comment.