[go: nahoru, domu]

Skip to content

Commit

Permalink
Add setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
millerdev committed Feb 21, 2018
1 parent 79d37a6 commit 2b68d30
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,13 @@ pip install nose flake8
nosetests
flake8
```

## Uploading to PyPI

```
pip install twine
pip install wheel
python setup.py sdist bdist_wheel
twine upload dist/*
```
47 changes: 47 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import os
import re
from io import open

from setuptools import find_packages, setup


def get_version(filename):
path = os.path.join(os.path.dirname(__file__), filename)
with open(path, encoding="utf-8") as handle:
content = handle.read()
return re.search(r'__version__ = "([^"]+)"', content).group(1)


def read(filename):
path = os.path.join(os.path.dirname(__file__), filename)
with open(path, encoding='utf-8') as handle:
return handle.read()


setup(
name='django-cte',
version=get_version('django_cte/__init__.py'),
description='Common Table Expressions (CTE) for Django',
long_description=read('README.md'),
maintainer='Daniel Miller',
maintainer_email='millerdev@gmail.com',
url='https://github.com/dimagi/django-cte',
license='BSD License',
packages=find_packages(exclude=['tests']),
include_package_data=True,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)

0 comments on commit 2b68d30

Please sign in to comment.