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 30, 2020
1 parent d6f5833 commit 069435d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 12 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2016-2018, Christian Kreuzberger, Anexia Internetdienstleistungs GmbH
Copyright (c) 2016-2020, Christian Kreuzberger, Anexia Internetdienstleistungs GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
67 changes: 56 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,71 @@
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.1.0'

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-passwordreset',
version='1.1.0rc3',
version=VERSION,
packages=find_packages(),
include_package_data=True,
license='BSD License',
description='An extension of django rest framework, providing a configurable password reset strategy',
long_description=README,
long_description_content_type='text/markdown', # This is important for README.md in markdown format
url='https://github.com/anx-ckreuzberger/django-rest-passwordreset',
author='Christian Kreuzberger',
author_email='ckreuzberger@anexia-it.com',
url='https://github.com/anexia-it/django-rest-passwordreset',
author='Harald Nezbeda',
author_email='hnezbeda@anexia-it.com',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
Expand All @@ -38,7 +77,13 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
# $ setup.py upload support.
cmdclass={
'upload': UploadCommand,
},
)

0 comments on commit 069435d

Please sign in to comment.