Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 583a304

Browse files
committedFeb 13, 2024
Make use of pyproject.toml for static project metadata
1 parent b603ff6 commit 583a304

File tree

2 files changed

+59
-41
lines changed

2 files changed

+59
-41
lines changed
 

‎pyproject.toml

+55-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
6+
[project]
7+
name = "JPype1"
8+
version = '1.5.0.dev0'
9+
authors = [
10+
{name = "Steve Menard", email = "devilwolf@users.sourceforge.net"},
11+
]
12+
maintainers = [
13+
{name = "Luis Nell", email = "cooperate@originell.org"},
14+
]
15+
description = "A Python to Java bridge"
16+
readme = "README.rst"
17+
requires-python = ">=3.7"
18+
license = {text = "License :: OSI Approved :: Apache Software License"}
19+
classifiers = [
20+
'Programming Language :: Python :: 3',
21+
'Programming Language :: Python :: 3.7',
22+
'Programming Language :: Python :: 3.8',
23+
'Programming Language :: Python :: 3.9',
24+
'Programming Language :: Python :: 3.10',
25+
'Programming Language :: Python :: 3.11',
26+
'Topic :: Software Development',
27+
'Topic :: Scientific/Engineering',
28+
]
29+
dependencies = [
30+
'packaging',
31+
'typing_extensions ; python_version< "3.8"',
32+
]
33+
34+
35+
[project.optional-dependencies]
36+
37+
docs = [
38+
'readthedocs-sphinx-ext',
39+
'sphinx',
40+
'sphinx-rtd-theme',
41+
]
42+
tests = [
43+
"pytest",
44+
]
45+
46+
47+
[project.entry-points.pyinstaller40]
48+
"hook-dirs" = "jpype._pyinstaller.entry_points:get_hook_dirs"
49+
"tests" = "jpype._pyinstaller.entry_points:get_PyInstaller_tests"
50+
51+
52+
[project.urls]
53+
homepage = "https://github.com/jpype-project/jpype"
54+
55+
156
[[tool.mypy.overrides]]
257
module = [
358
"_jpype",
@@ -9,4 +64,3 @@ module = [
964
"jedi.access",
1065
]
1166
ignore_missing_imports = true
12-

‎setup.py

+4-40
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
from setuptools import Extension
2424
from setuptools import setup
2525

26+
# Add our setupext package to the path, and import it.
27+
sys.path.append(str(Path(__file__).parent))
2628
import setupext
2729

2830
if '--android' in sys.argv:
@@ -48,48 +50,17 @@
4850

4951

5052
setup(
51-
name='JPype1',
52-
version='1.5.1_dev0',
53-
description='A Python to Java bridge.',
54-
long_description=open('README.rst').read(),
55-
license='License :: OSI Approved :: Apache Software License',
56-
author='Steve Menard',
57-
author_email='devilwolf@users.sourceforge.net',
58-
maintainer='Luis Nell',
59-
maintainer_email='cooperate@originell.org',
60-
python_requires=">=3.7",
61-
url='https://github.com/jpype-project/jpype',
53+
# Non-standard, and extension behaviour. See also:
54+
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration
6255
platforms=[
6356
'Operating System :: Microsoft :: Windows',
6457
'Operating System :: POSIX',
6558
'Operating System :: Unix',
6659
'Operating System :: MacOS',
6760
],
68-
classifiers=[
69-
'Programming Language :: Python :: 3',
70-
'Programming Language :: Python :: 3.7',
71-
'Programming Language :: Python :: 3.8',
72-
'Programming Language :: Python :: 3.9',
73-
'Programming Language :: Python :: 3.10',
74-
'Topic :: Software Development',
75-
'Topic :: Scientific/Engineering',
76-
],
7761
packages=['jpype', 'jpype._pyinstaller'],
7862
package_dir={'jpype': 'jpype', },
7963
package_data={'jpype': ['*.pyi']},
80-
install_requires=['typing_extensions ; python_version< "3.8"',
81-
'packaging'],
82-
tests_require=['pytest'],
83-
extras_require={
84-
'tests': [
85-
'pytest',
86-
],
87-
'docs': [
88-
'readthedocs-sphinx-ext',
89-
'sphinx',
90-
'sphinx-rtd-theme',
91-
],
92-
},
9364
cmdclass={
9465
'build_ext': setupext.build_ext.BuildExtCommand,
9566
'test_java': setupext.test_java.TestJavaCommand,
@@ -98,11 +69,4 @@
9869
},
9970
zip_safe=False,
10071
ext_modules=[jpypeJar, jpypeLib, ],
101-
distclass=setupext.dist.Distribution,
102-
entry_points={
103-
'pyinstaller40': [
104-
'hook-dirs = jpype._pyinstaller.entry_points:get_hook_dirs',
105-
'tests = jpype._pyinstaller.entry_points:get_PyInstaller_tests',
106-
],
107-
},
10872
)

0 commit comments

Comments
 (0)
Please sign in to comment.