Skip to content

Commit

Permalink
Update license and setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nezhar committed Jan 14, 2020
1 parent 017dee5 commit e27febc
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 13 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, Christian Kreuzberger.
Copyright (c) 2016-2020, Christian Kreuzberger, Anexia Internetdienstleistungs GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand All @@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Django Rest Multi Token Auth

This django app is an extension for the Django Rest Framework (Version 3.4+).
It tries to overcome the limitation of Token Authentication, which only uses a single
token per user.
Expand Down Expand Up @@ -73,6 +74,7 @@ tox
```

## Cache Backend

If you want to use a cache for the session store, you can install [django-memoize](https://pythonhosted.org/django-memoize/) and add `'memoize'` to `INSTALLED_APPS`.

Then you need to use ``CachedMultiTokenAuthentication`` instead of ``MultiTokenAuthentication``.
Expand All @@ -92,10 +94,12 @@ If your project uses an older verison of Django or Django Rest Framework, you ca


## Changelog / Releases
All releases should be listed in the [releases tab on github](https://github.com/anx-ckreuzberger/django-rest-multiauthtoken/releases).

All releases should be listed in the [releases tab on github](https://github.com/anexia-it/django-rest-multitokenauth/releases).

See [CHANGELOG.md](CHANGELOG.md) for a more detailed listing.


## License

This project is published with the [BSD 3 Clause License](LICENSE). See [https://choosealicense.com/licenses/bsd-3-clause-clear/](https://choosealicense.com/licenses/bsd-3-clause-clear/) for more information about what this means.
66 changes: 56 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,58 @@
import io
import os
import sys
from shutil import rmtree

from setuptools import find_packages, setup
from setuptools import find_packages, setup, Command

with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
VERSION = '1.3.2'

here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
README = '\n' + f.read()


class UploadCommand(Command):
"""Support setup.py upload."""

description = 'Build and publish the package.'
user_options = []

@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
try:
self.status('Removing previous builds...')
rmtree(os.path.join(here, 'dist'))
except OSError:
pass

self.status('Building Source and Wheel (universal) distribution...')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))

self.status('Uploading the package to PyPI via Twine...')
os.system('twine upload dist/*')

self.status('Pushing git tags...')
os.system('git tag {0}'.format(VERSION))
os.system('git push --tags')

sys.exit()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
name='django-rest-multitokenauth',
version='1.4.0alpha1',
packages=find_packages(),
version=VERSION,
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
install_requires=[
'django-ipware==2.1.*',
],
Expand All @@ -20,9 +61,10 @@
description='An extension of django rest frameworks token auth, providing multiple authentication tokens per user',
long_description=README,
long_description_content_type='text/markdown',
url='https://github.com/anx-ckreuzberger/django-rest-multiauthtoken',
author='Christian Kreuzberger',
author_email='[email protected]',
url='https://github.com/anexia-it/django-rest-multitokenauth',
author='Harald Nezbeda',
author_email='[email protected]',
python_requires='>=3.4.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
Expand All @@ -45,4 +87,8 @@
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
# $ setup.py upload support.
cmdclass={
'upload': UploadCommand,
},
)

0 comments on commit e27febc

Please sign in to comment.