Skip to content

Commit 22e9eaa

Browse files
committed
Moved some stuff from setup.py and setup.cfg into pyproject.toml
Improved stuff in setup.py a bit.
1 parent a1cbd35 commit 22e9eaa

File tree

3 files changed

+75
-68
lines changed

3 files changed

+75
-68
lines changed

pyproject.toml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.2.0", "wheel", "setuptools_scm[toml] >= 3.4.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "parglare"
7+
authors = [{name = "Igor R. Dejanovic", email = "[email protected]"}]
8+
license = {text = "MIT"}
9+
description = "A pure Python Scannerless LR/GLR parser"
10+
keywords = ["parglare"]
11+
readme = "README.rst"
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Intended Audience :: Developers",
15+
"Intended Audience :: Information Technology",
16+
"Intended Audience :: Science/Research",
17+
"Topic :: Software Development :: Interpreters",
18+
"Topic :: Software Development :: Compilers",
19+
"Topic :: Software Development :: Libraries :: Python Modules",
20+
"License :: OSI Approved :: MIT License",
21+
"Natural Language :: English",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.6",
24+
"Programming Language :: Python :: 3.7",
25+
"Programming Language :: Python :: 3.8",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Operating System :: OS Independent",
29+
]
30+
dependencies = ["click >=7.0, <8.0"]
31+
dynamic = ["version"]
32+
33+
[project.urls]
34+
Homepage = "https://github.com/igordejanovic/parglare"
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"wheel",
39+
"mkdocs",
40+
"mike",
41+
"twine",
42+
]
43+
test = [
44+
"flake8",
45+
"coverage",
46+
"coveralls",
47+
"pytest",
48+
]
49+
50+
[project.scripts]
51+
pglr = "parglare.cli:pglr"
52+
53+
[tool.setuptools]
54+
packages = ["parglare", "parglare.tables"]
55+
zip-safe = false
56+
include-package-data = true
57+
package-dir = {parglare = "parglare"}
58+
59+
[tool.setuptools_scm]
60+
write_to_template = "__version__ = \"{version}\"\n"
61+
write_to = "parglare/version.py"
62+
63+
[tool.distutils.bdist_wheel]
64+
universal = 1
65+
66+
[tool.flake8]
67+
max-line-length = "90"
68+
exclude = """
69+
.git/*,.eggs/*,
70+
parglare/six.py,
71+
build/*,venv/*"""

setup.cfg

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

setup.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@
77
this_dir = Path(__file__).absolute().parent
88

99
if sys.argv[-1].startswith('publish'):
10-
if os.system("pip list | grep wheel"):
10+
if os.system("pip3 list | grep wheel"):
1111
print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
1212
sys.exit()
13-
if os.system("pip list | grep twine"):
13+
if os.system("pip3 list | grep twine"):
1414
print("twine not installed.\nUse `pip install twine`.\nExiting.")
1515
sys.exit()
16-
os.system("python setup.py sdist bdist_wheel")
16+
os.system("python3 -m pep517 -bs .")
1717
if sys.argv[-1] == 'publishtest':
1818
os.system("twine upload -r test dist/*")
1919
else:
2020
os.system("twine upload dist/*")
2121
sys.exit()
2222

2323
if __name__ == "__main__":
24-
setup(use_scm_version={
25-
"write_to": str(this_dir / "parglare" / "version.py"),
26-
"write_to_template": '__version__ = "{version}"\n',
27-
})
24+
setup()

0 commit comments

Comments
 (0)