Skip to content

Commit

Permalink
Revise setup.py for easier maintainability.
Browse files Browse the repository at this point in the history
  • Loading branch information
disko committed Oct 11, 2016
1 parent 564f1d8 commit 037f18a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 22 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ test: bin/py.test
bin/py.test -q -n4

bin/py.test: .pip.log *.py *.cfg
bin/python setup.py dev
bin/pip install -e ".[testing]"
@touch $@

.pip.log: bin/python requirements.txt
bin/pip install -r requirements.txt --log .pip.log
.pip.log: bin/python
bin/pip install -e ".[development]" --log .pip.log

bin/python:
virtualenv-$(version) --no-site-packages --distribute .
@touch $@

clean:
@rm -rfv bin/ include/ lib/
@rm -rfv bin/ include/ lib/ share/ .Python

.PHONY: test clean

49 changes: 31 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
from setuptools import find_packages
from setuptools import setup

here = os.path.abspath(os.path.dirname(__file__))

def read(*parts):
""" Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
Copied from
https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
"""

with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f:
return f.read()
version = '1.3.1.dev0'
description = "A high-level, Pythonic web application framework based on " \
"Pyramid and SQLAlchemy. It includes an extensible Content " \
"Management System called the Kotti CMS."
author = 'Kotti developers'
author_email = 'kotti@googlegroups.com'
url = 'http://kotti.pylonsproject.org/'
keywords = 'kotti web cms wcms pylons pyramid sqlalchemy bootstrap'
license = "BSD-derived (http://www.repoze.org/LICENSE.txt)"


install_requires = [
Expand Down Expand Up @@ -100,9 +98,24 @@ def read(*parts):
'setuptools_git>=0.3',
]


here = os.path.abspath(os.path.dirname(__file__))

def read(*parts):
""" Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
Copied from
https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
"""

with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f:
return f.read()


setup(name='Kotti',
version='1.3.1.dev0',
description="A high-level, Pythonic web application framework based on Pyramid and SQLAlchemy. It includes an extensible Content Management System called the Kotti CMS.", # noqa
version=version,
description=description,
long_description='\n\n'.join([
read('README.rst'),
read('AUTHORS.txt'),
Expand Down Expand Up @@ -146,11 +159,11 @@ def read(*parts):
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Application Frameworks', # noqa
],
author='Kotti developers',
author_email='kotti@googlegroups.com',
url='http://kotti.pylonsproject.org/',
keywords='kotti web cms wcms pylons pyramid sqlalchemy bootstrap',
license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
author=author,
author_email=author_email,
url=url,
keywords=keywords,
license=license,
packages=find_packages(),
include_package_data=True,
zip_safe=False,
Expand Down

0 comments on commit 037f18a

Please sign in to comment.