Skip to content

Commit

Permalink
Merge pull request #43 from roverdotcom/0.2.0-release
Browse files Browse the repository at this point in the history
0.2.0 release
  • Loading branch information
melinath committed Apr 1, 2019
2 parents 696928a + 86511b1 commit af9536c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion django_inlinecss/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION = (0, 1, 2)
VERSION = (0, 2, 0)

__version__ = '.'.join(map(str, VERSION))
44 changes: 44 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

import io
import os
import sys
from shutil import rmtree

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

Expand Down Expand Up @@ -72,6 +75,43 @@
about['__version__'] = VERSION


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 v{0}'.format(about['__version__']))
os.system('git push --tags')

sys.exit()


setup(
name=NAME,
version=about['__version__'],
Expand Down Expand Up @@ -104,4 +144,8 @@
install_requires=REQUIRED,
tests_require=TESTS,
extras_require=EXTRAS,
# $ setup.py upload support.
cmdclass={
'upload': UploadCommand,
},
)

0 comments on commit af9536c

Please sign in to comment.