Skip to content
New issue

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

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

Already on GitHub? # to your account

Moved the metadata into setup.cfg #104

Merged
merged 1 commit into from
Feb 8, 2020
Merged
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
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ python:
- "3.6"
- "3.7"
- "3.8"

install: pip install -U tox-travis
install:
- pip install -U tox-travis pip setuptools setuptools_scm wheel
- python3 ./setup.py bdist_wheel
- pip install ./dist/*.whl
script: tox
3 changes: 1 addition & 2 deletions parglare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
from parglare.exceptions import ParserInitError, ParseError, GrammarError, \
DisambiguationError


__version__ = "0.12.0"
from .version import __version__
41 changes: 41 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
[metadata]
name = parglare
author = Igor R. Dejanovic
author_email = igorREPLACEWITHDOTdejanovic@gmail.com
license = MIT
description = A pure Python Scannerless LR/GLR parser
keywords = parglare
url = https://github.com/igordejanovic/parglare
long_description = file: 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.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Operating System :: OS Independent

[options]
packages = parglare, parglare.tables
zip_safe = False
install_requires = click
include_package_data = True
tests_require = flake8; tox; coverage; coveralls; pytest
package_dir =
parglare = parglare
test_suite = tests
setup_requires = setuptools_scm;

[options.entry_points]
console_scripts = pglr = parglare.cli:pglr

[bumpversion]
current_version = 0.1.0
commit = True
Expand Down
81 changes: 10 additions & 71 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import codecs
import os
from setuptools import setup

VERSIONFILE = "parglare/__init__.py"
VERSION = None
for line in open(VERSIONFILE, "r").readlines():
if line.startswith('__version__'):
VERSION = line.split('"')[1]

if not VERSION:
raise RuntimeError('No version defined in parglare.__init__.py')


README = codecs.open(os.path.join(os.path.dirname(__file__), 'README.rst'),
'r', encoding='utf-8').read()
from pathlib import Path
this_dir = Path(__file__).absolute().parent

if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
Expand All @@ -30,60 +18,11 @@
os.system("twine upload -r test dist/*")
else:
os.system("twine upload dist/*")
print("You probably want to also tag the version now:")
print(" git tag -a {0} -m 'version {0}'".format(VERSION))
print(" git push --tags")
print("You probably want to also tag the version now.")
sys.exit()


setup(
name='parglare',
version=VERSION,
description="A pure Python Scannerless LR/GLR parser",
long_description=README,
author="Igor R. Dejanovic",
author_email='igorREPLACEWITHDOTdejanovic@gmail.com',
url='https://github.com/igordejanovic/parglare',
packages=[
'parglare',
'parglare.tables'
],
package_dir={'parglare':
'parglare'},
include_package_data=True,
install_requires=['click'],
tests_require=[
'flake8',
'tox',
'coverage',
'coveralls',
'pytest',
],
test_suite='tests',
license="MIT license",
zip_safe=False,
keywords='parglare',
entry_points={
'console_scripts': [
'pglr = parglare.cli:pglr'
]
},
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.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Operating System :: OS Independent',
]
)
if __name__ == "__main__":
setup(use_scm_version={
"write_to": str(this_dir / "parglare" / "version.py"),
"write_to_template": '__version__ = "{version}"\n',
})