Skip to content

Commit 6866a1b

Browse files
committed
Move package setup to pyproject.toml
1 parent 04266c2 commit 6866a1b

File tree

2 files changed

+54
-47
lines changed

2 files changed

+54
-47
lines changed

pyproject.toml

+53
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
[build-system]
2+
requires = ["setuptools>=61", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
6+
[project]
7+
name = "hetmatpy"
8+
description = "Matrix implementations for hetnets and path-count-based measures"
9+
readme = "README.md"
10+
keywords = [
11+
"hetnet",
12+
"hetmat",
13+
"graph",
14+
"heterogeneous",
15+
"network",
16+
"hetio",
17+
"hetnetpy",
18+
"dwpc",
19+
"numpy",
20+
]
21+
classifiers = [
22+
"Intended Audience :: Science/Research",
23+
"Topic :: Scientific/Engineering :: Bio-Informatics",
24+
"Topic :: Scientific/Engineering :: Information Analysis",
25+
]
26+
requires-python = ">=3.7"
27+
license = {file = "LICENSE.md"}
28+
dynamic = ["version"]
29+
dependencies = [
30+
"hetnetpy>=0.3.0",
31+
"numpy",
32+
"pandas",
33+
"scipy",
34+
]
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"pre-commit",
39+
"portray",
40+
"pytest",
41+
"xarray",
42+
]
43+
44+
[project.urls]
45+
Source = "https://github.com/hetio/hetmatpy"
46+
Documentation = "https://hetio.github.io/hetmatpy"
47+
Tracker = "https://github.com/hetio/hetmatpy/issues"
48+
Homepage = "https://het.io/software/"
49+
Publication = "https://greenelab.github.io/connectivity-search-manuscript/"
50+
51+
[tool.setuptools.dynamic]
52+
version = {attr = "hetmatpy.__version__"}
53+
154
# https://pycqa.github.io/isort/docs/configuration/config_files.html
255
[tool.isort]
356
profile = "black"

setup.py

+1-47
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,3 @@
1-
import pathlib
2-
import re
3-
41
import setuptools
52

6-
directory = pathlib.Path(__file__).parent.resolve()
7-
8-
# version
9-
init_path = directory.joinpath("hetmatpy", "__init__.py")
10-
text = init_path.read_text(encoding="utf-8-sig")
11-
pattern = re.compile(r"^__version__ = ['\"]([^'\"]*)['\"]", re.MULTILINE)
12-
version = pattern.search(text).group(1)
13-
14-
# long_description
15-
readme_path = directory.joinpath("README.md")
16-
long_description = readme_path.read_text(encoding="utf-8-sig")
17-
18-
setuptools.setup(
19-
name="hetmatpy",
20-
description="Matrix implementations for hetnets and path-count-based measures",
21-
long_description_content_type="text/markdown",
22-
long_description=long_description,
23-
url="https://github.com/hetio/hetmatpy",
24-
project_urls={
25-
"Source": "https://github.com/hetio/hetmatpy",
26-
"Documentation": "https://hetio.github.io/hetmatpy",
27-
"Tracker": "https://github.com/hetio/hetmatpy/issues",
28-
"Homepage": "https://het.io/software/",
29-
"Publication": "https://greenelab.github.io/connectivity-search-manuscript/",
30-
},
31-
license="BSD-2-Clause Plus Patent License",
32-
packages=setuptools.find_packages(),
33-
python_requires=">=3.7",
34-
install_requires=[
35-
"hetnetpy>=0.3.0",
36-
"numpy",
37-
"pandas",
38-
"scipy",
39-
],
40-
extras_require={
41-
"dev": [
42-
"black",
43-
"flake8",
44-
"portray",
45-
"pytest",
46-
"xarray",
47-
]
48-
},
49-
)
3+
setuptools.setup()

0 commit comments

Comments
 (0)