Skip to content

Commit 7e0e0de

Browse files
Jammy2211Jammy2211
authored andcommitted
implement pyproject.toml
1 parent ab129ab commit 7e0e0de

File tree

3 files changed

+52
-35
lines changed

3 files changed

+52
-35
lines changed

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "setuptools-scm", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "autoarray"
7+
dynamic = ["version", "dependencies"]
8+
description="PyAuto Data Structures"
9+
readme = { file = "README.rst", content-type = "text/x-rst" }
10+
license = { text = "MIT License" }
11+
requires-python = ">=3.9"
12+
authors = [
13+
{ name = "James Nightingale", email = "James.Nightingale@newcastle.ac.uk" },
14+
{ name = "Richard Hayes", email = "richard@rghsoftware.co.uk" },
15+
]
16+
classifiers = [
17+
"Intended Audience :: Science/Research",
18+
"Topic :: Scientific/Engineering :: Physics",
19+
"License :: OSI Approved :: MIT License",
20+
"Natural Language :: English",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12"
26+
]
27+
keywords = ["cli"]
28+
29+
[project.urls]
30+
Homepage = "https://github.com/Jammy2211/PyAutoArray"
31+
32+
[tool.setuptools]
33+
include-package-data = true
34+
35+
[tool.setuptools.packages.find]
36+
exclude = ["docs", "test_autoarray", "test_autoarray*"]
37+
38+
[tool.setuptools.dynamic]
39+
dependencies = { file = "requirements.txt" }
40+
41+
[tool.setuptools_scm]
42+
version_scheme = "post-release"
43+
local_scheme = "no-local-version"
44+
45+
46+
[project.optional-dependencies]
47+
test = ["pytest"]
48+
dev = ["pytest", "black"]
49+
50+
[tool.pytest.ini_options]
51+
testpaths = ["test_autoarray"]

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,24 @@
33
from os import environ
44
from os.path import abspath, dirname, join
55

6-
from setuptools import find_packages, setup
6+
from setuptools import setup
77

88
this_dir = abspath(dirname(__file__))
9-
with open(join(this_dir, "README.rst"), encoding="utf-8") as file:
10-
long_description = file.read()
119

1210
with open(join(this_dir, "requirements.txt")) as f:
1311
requirements = f.read().split("\n")
1412

1513
version = environ.get("VERSION", "1.0.dev0")
1614
requirements.extend([f"autoconf=={version}"])
1715

18-
1916
def config_packages(directory):
2017
paths = [directory.replace("/", ".")]
2118
for path, directories, filenames in os.walk(directory):
2219
for directory in directories:
2320
paths.append(f"{path}/{directory}".replace("/", "."))
2421
return paths
2522

26-
2723
setup(
28-
name="autoarray",
2924
version=version,
30-
description="PyAuto Data Structures",
31-
long_description=long_description,
32-
long_description_content_type="text/x-rst",
33-
url="https://github.com/Jammy2211/PyAutoArray",
34-
author="James Nightingale and Richard Hayes",
35-
author_email="james.w.nightingale@durham.ac.uk",
36-
include_package_data=True,
37-
license="MIT License",
38-
classifiers=[
39-
"Intended Audience :: Science/Research",
40-
"Topic :: Scientific/Engineering :: Physics",
41-
"License :: OSI Approved :: MIT License",
42-
"Natural Language :: English",
43-
"Operating System :: OS Independent",
44-
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.2",
46-
"Programming Language :: Python :: 3.3",
47-
"Programming Language :: Python :: 3.4",
48-
"Programming Language :: Python :: 3.5",
49-
"Programming Language :: Python :: 3.6",
50-
"Programming Language :: Python :: 3.7",
51-
],
52-
keywords="cli",
53-
packages=find_packages(exclude=["docs", "test_autoarray", "test_autoarray*"])
54-
+ config_packages("autoarray/config"),
5525
install_requires=requirements,
56-
setup_requires=["pytest-runner"],
57-
tests_require=["pytest"],
5826
)

0 commit comments

Comments
 (0)