Skip to content

Commit

Permalink
Create PyPI package
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynovikov committed Dec 13, 2018
1 parent cd3657d commit 6d2c34f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
__pycache__/
build/
dist/
*.egg-info/
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include LICENSE
include README.md
include MANIFEST.in
recursive-include daterangefilter *.py *.html *.po *.mo
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.PHONY: test sdist wheel release pre-release clean

test:
python runtests.py

sdist:
python setup.py sdist

wheel:
python setup.py bdist_wheel --universal

release: clean sdist wheel
twine upload dist/*

pre-release: sdist wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
rm -rf build
rm -rf dist
rm -rf *.egg-info
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Build Status](https://travis-ci.org/andreynovikov/django-daterangefilter.svg?branch=master)](https://travis-ci.org/andreynovikov/django-daterangefilter)
[![GitHub release](https://img.shields.io/github/release/andreynovikov/django-daterangefilter.svg)](https://github.com/andreynovikov/django-daterangefilter/releases/latest)
[![PyPI release](https://img.shields.io/pypi/v/django-daterangefilter.svg)](https://pypi.org/project/django-daterangefilter/)
[![Python version](https://img.shields.io/pypi/pyversions/django-daterangefilter.svg)](https://pypi.org/project/django-daterangefilter/)
[![GitHub issues](https://img.shields.io/github/issues/andreynovikov/django-daterangefilter.svg)](https://github.com/andreynovikov/django-daterangefilter/issues)
[![GitHub license](https://img.shields.io/github/license/andreynovikov/django-daterangefilter.svg)](LICENSE)

Expand All @@ -14,10 +16,10 @@ Application adds three Django admin list filters: ```DateRangeFilter```, ```Past

## Installation

Clone repo into Django project root:
Install ```django-daterangefilter``` using pip:

```
git clone https://github.com/andreynovikov/django-daterangefilter.git daterangefilter
pip install django-daterangefilter
```

Add ```daterangefilter``` to ```INSTALLED_APPS```. Example:
Expand Down
39 changes: 21 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
import setuptools

with open("README.md", "r") as fh:
with open('README.md', 'r') as fh:
long_description = fh.read()

setuptools.setup(
name="django-daterangefilter",
version="0.0.1",
name='django-daterangefilter',
version='0.1.1',
license='MIT',
author="Andrey Novikov",
author_email="[email protected]",
description="Date range filter for Django admin",
author='Andrey Novikov',
author_email='[email protected]',
description='Date range filter for Django admin',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/andreynovikov/django-daterangefilter/tree/master",
long_description_content_type='text/markdown',
url='https://github.com/andreynovikov/django-daterangefilter/tree/master',
project_urls={
'Source': 'https://github.com/andreynovikov/django-daterangefilter/',
'Tracker': 'https://github.com/andreynovikov/django-daterangefilter/issues',
},
packages=setuptools.find_packages(),
include_package_data=True,
zip_safe=False,
classifiers=[
"Framework :: Django",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
'Development Status :: 4 - Beta',
'Framework :: Django',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
)

0 comments on commit 6d2c34f

Please sign in to comment.