Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move metadata to pyproject.toml, fix test fixture inclusion in sdist #111

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
recursive-include tests *.py
recursive-include tests *.py test-data/*
recursive-include immutables *.py *.c *.h *.pyi
include LICENSE* NOTICE README.rst bench.png
include immutables/py.typed
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,65 @@
[project]
name = "immutables"
description = "Immutable Collections"
authors = [{name = "MagicStack Inc", email = "[email protected]"}]
readme = "README.rst"
license = {text = "Apache License, Version 2.0"}
dynamic = ["version"]
keywords = [
"collections",
"immutable",
"hamt",
]
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries",
]
dependencies = [
'typing-extensions>=3.7.4.3;python_version<"3.8"',
]

[project.urls]
github = "https://github.com/MagicStack/immutables"

[project.optional-dependencies]
# Minimal dependencies required to test immutables.
# pycodestyle is a dependency of flake8, but it must be frozen because
# their combination breaks too often
# (example breakage: https://gitlab.com/pycqa/flake8/issues/427)
test = [
'flake8~=5.0',
'pycodestyle~=2.9',
'mypy~=1.4',
'pytest~=7.4',
]

[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
zip-safe = false

[tool.setuptools.packages.find]
include = ["immutables", "immutables.*"]

[tool.setuptools.package-data]
immutables = ["py.typed", "*.pyi"]

[tool.setuptools.exclude-package-data]
"*" = ["*.c", "*.h"]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--capture=no --assert=plain --strict-markers --tb=native --import-mode=importlib"
Expand Down
46 changes: 0 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@
import setuptools


# Minimal dependencies required to test immutables.
TEST_DEPENDENCIES = [
# pycodestyle is a dependency of flake8, but it must be frozen because
# their combination breaks too often
# (example breakage: https://gitlab.com/pycqa/flake8/issues/427)
'flake8~=5.0',
'pycodestyle~=2.9',
'mypy~=1.4',
'pytest~=7.4',
]

EXTRA_DEPENDENCIES = {
'test': TEST_DEPENDENCIES,
}

system = platform.uname().system
CFLAGS = ['-O2']

Expand Down Expand Up @@ -62,38 +47,7 @@
ext_modules = []


with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
readme = f.read()


setuptools.setup(
name='immutables',
version=VERSION,
description='Immutable Collections',
long_description=readme,
python_requires='>=3.7',
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
],
author='MagicStack Inc',
author_email='[email protected]',
url='https://github.com/MagicStack/immutables',
license='Apache License, Version 2.0',
packages=['immutables'],
package_data={"immutables": ["py.typed", "*.pyi"]},
provides=['immutables'],
include_package_data=True,
ext_modules=ext_modules,
install_requires=['typing-extensions>=3.7.4.3;python_version<"3.8"'],
extras_require=EXTRA_DEPENDENCIES,
)