Skip to content

Commit 3a6cf4a

Browse files
committed
MNT: Move most build metadata into pyproject.toml
1 parent 8796a27 commit 3a6cf4a

File tree

2 files changed

+54
-40
lines changed

2 files changed

+54
-40
lines changed

pyproject.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,56 @@ requires = [
1010
]
1111
build-backend = "setuptools.build_meta"
1212

13+
[project]
14+
name = "nitime"
15+
dynamic = ["version"]
16+
description = "Nitime: timeseries analysis for neuroscience data"
17+
readme = "README.txt"
18+
license = { file = "LICENSE" }
19+
requires-python = ">=3.7"
20+
authors = [
21+
{ name = "Nitime developers", email = "[email protected]" },
22+
]
23+
maintainers = [
24+
{ name = "Nipy Developers", email = "[email protected]" },
25+
]
26+
classifiers = [
27+
"Development Status :: 3 - Alpha",
28+
"Environment :: Console",
29+
"Intended Audience :: Science/Research",
30+
"License :: OSI Approved :: BSD License",
31+
"Operating System :: OS Independent",
32+
"Programming Language :: Python",
33+
"Topic :: Scientific/Engineering",
34+
]
35+
dependencies = [
36+
"matplotlib",
37+
"numpy",
38+
"scipy",
39+
]
40+
41+
[project.optional-dependencies]
42+
full = [
43+
"networkx",
44+
"nibabel",
45+
]
46+
47+
[project.urls]
48+
Download = "http://github.com/nipy/nitime/downloads"
49+
Homepage = "http://nipy.org/nitime"
50+
51+
[tool.setuptools.packages.find]
52+
include = ["nitime*"]
53+
54+
[tool.setuptools.package-data]
55+
nitime = [
56+
"tests/*.txt",
57+
"tests/*.npy",
58+
"data/*.nii.gz",
59+
"data/*.txt",
60+
"data/*.csv",
61+
]
62+
1363
[tool.cibuildwheel]
1464
# Disable CPython 3.6 here; if project.requires-python gets defined,
1565
# cp36* can be removed

setup.py

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,14 @@
22
"""Setup file for the Python nitime package."""
33

44
import os
5-
import sys
5+
from runpy import run_path
66

7-
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
8-
# update it when the contents of directories change.
9-
if os.path.exists('MANIFEST'):
10-
os.remove('MANIFEST')
11-
12-
from setuptools import find_packages, setup
7+
from setuptools import setup
138

149
# Get version and release info, which is all stored in nitime/version.py
15-
ver_file = os.path.join('nitime', 'version.py')
16-
with open(ver_file) as f:
17-
exec(f.read())
18-
19-
REQUIRES = []
20-
21-
with open('requirements.txt') as f:
22-
ll = f.readline()[:-1]
23-
while ll:
24-
REQUIRES.append(ll)
25-
ll = f.readline()[:-1]
26-
27-
PACKAGES = find_packages()
28-
10+
VARS = run_path(os.path.join('nitime', 'version.py'))
2911

30-
opts = dict(name=NAME,
31-
maintainer=MAINTAINER,
32-
maintainer_email=MAINTAINER_EMAIL,
33-
description=DESCRIPTION,
34-
long_description=LONG_DESCRIPTION,
35-
url=URL,
36-
download_url=DOWNLOAD_URL,
37-
license=LICENSE,
38-
classifiers=CLASSIFIERS,
39-
author=AUTHOR,
40-
author_email=AUTHOR_EMAIL,
41-
platforms=PLATFORMS,
42-
version=VERSION,
43-
packages=PACKAGES,
44-
package_data=PACKAGE_DATA,
45-
install_requires=REQUIRES,
46-
requires=REQUIRES,
47-
python_requires=PYTHON_REQUIRES,
48-
)
12+
opts = {'version': VARS['__version__']}
4913

5014
try:
5115
from setuptools import Extension

0 commit comments

Comments
 (0)