Skip to content

Commit

Permalink
Moving to setup.cfg (#208)
Browse files Browse the repository at this point in the history
* Moving to setup.cfg

* Since pip>=9.0.0 you can specify the Python version

So this ugly hack is no longer needed
  • Loading branch information
regebro authored Nov 5, 2019
1 parent 0e31cc4 commit ae192aa
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 64 deletions.
53 changes: 50 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
[pep8]
max-line-length=100
ignore=E129
[metadata]
name = hovercraft
version = 2.7.dev0
description = Makes impress.js presentations from reStructuredText
long_description = file: README.rst, CHANGES.txt
classifiers =
Development Status :: 5 - Production/Stable
Topic :: Multimedia :: Graphics :: Presentation
Topic :: Text Processing
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
License :: OSI Approved :: MIT License
keywords = presentations,restructuredtext
author = Lennart Regebro
author_email = [email protected]
url = https://github.com/regebro/hovercraft
license = MIT

[options]
packages = find:
include_package_data = True
zip_safe = False
install_requires =
setuptools
docutils >= 0.9
lxml>=3.1.0
svg.path
pygments
watchdog
tests_require =
manuel
test_suite = tests
python_requires = >= 3.5

[options.packages.find]
exclude =
ez_setup
examples
tests

[options.entry_points]
console_scripts =
hovercraft = hovercraft:main

[flake8]
max-line-length=120
63 changes: 2 additions & 61 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,62 +1,3 @@
from io import open
from setuptools import setup, find_packages
from setuptools.command.install import install
import sys
from setuptools import setup

version = "2.7.dev0"

with open("README.rst", "rt", encoding="utf8") as readme:
description = readme.read()

with open("CHANGES.txt", "rt", encoding="utf8") as changes:
history = changes.read()


class CustomInstall(install):
def initialize_options(self):
if sys.version < "3":
print("Hovercraft requires Python 3.5 or higher.")
sys.exit(1)

return install.initialize_options(self)


setup(
name="hovercraft",
version=version,
description="Makes impress.js presentations from reStructuredText",
long_description=description + "\n" + history,
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Multimedia :: Graphics :: Presentation",
"Topic :: Text Processing",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: MIT License",
],
keywords="presentations restructuredtext",
author="Lennart Regebro",
author_email="[email protected]",
url="https://github.com/regebro/hovercraft",
license="MIT",
packages=find_packages(exclude=["ez_setup", "examples", "tests"]),
include_package_data=True,
zip_safe=False,
install_requires=[
"setuptools",
"docutils >= 0.9",
"lxml>=3.1.0",
"svg.path",
"pygments",
"watchdog",
],
tests_require=["manuel",],
test_suite="tests",
entry_points={"console_scripts": ["hovercraft = hovercraft:main",],},
cmdclass={"install": CustomInstall},
)
setup()

0 comments on commit ae192aa

Please sign in to comment.