Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved some stuff from setup.py into pyproject.toml #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[build-system]
requires = ["setuptools >= 61.2.0", "wheel", "setuptools_scm[toml] >= 3.4.3"]
build-backend = "setuptools.build_meta"

[project]
name = "parglare"
authors = [{name = "Igor R. Dejanovic", email = "[email protected]"}]
license = {text = "MIT"}
description = "A pure Python Scannerless LR/GLR parser"
keywords = ["parglare"]
readme = "README.rst"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Software Development :: Interpreters",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
]
dependencies = ["click >=7.0, <8.0"]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/igordejanovic/parglare"

[project.optional-dependencies]
dev = [
"wheel",
"mkdocs",
"mike",
"twine",
]
test = [
"flake8",
"coverage",
"coveralls",
"pytest",
]

[project.scripts]
pglr = "parglare.cli:pglr"

[tool.setuptools]
packages = ["parglare", "parglare.tables"]
zip-safe = false
include-package-data = true
package-dir = {parglare = "parglare"}

[tool.setuptools_scm]
write_to_template = "__version__ = \"{version}\"\n"
write_to = "parglare/version.py"

[tool.distutils.bdist_wheel]
universal = 1

[tool.flake8]
max-line-length = "90"
exclude = """
.git/*,.eggs/*,
parglare/six.py,
build/*,venv/*"""
61 changes: 0 additions & 61 deletions setup.cfg

This file was deleted.

11 changes: 4 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@
this_dir = Path(__file__).absolute().parent

if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
if os.system("pip3 list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
sys.exit()
if os.system("pip list | grep twine"):
if os.system("pip3 list | grep twine"):
print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
os.system("python3 -m pep517 -bs .")
if sys.argv[-1] == 'publishtest':
os.system("twine upload -r test dist/*")
else:
os.system("twine upload dist/*")
sys.exit()

if __name__ == "__main__":
setup(use_scm_version={
"write_to": str(this_dir / "parglare" / "version.py"),
"write_to_template": '__version__ = "{version}"\n',
})
setup()