Skip to content

Commit

Permalink
added publish feature to setup.py
Browse files Browse the repository at this point in the history
updated docs
  • Loading branch information
mmarcos committed Oct 2, 2017
1 parent 76ee448 commit bb3587d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/lists.md
Expand Up @@ -167,7 +167,9 @@ the `published` field with some [Font Awesome icons](http://fontawesome.io/icons
symbol = 'fa-check' if row.published else 'fa-minus'
return mark_safe('<i class="fa {}"></i>'.format(symbol))

If there's need for more extensive HTML in a field, consider using an external
If there's a need for more extensive HTML in a field, consider using an external
template file instead of embedding markup in a string.


### Links

18 changes: 16 additions & 2 deletions setup.py
@@ -1,6 +1,9 @@
import os
import shutil
import sys
from setuptools import (find_packages, setup)

__VERSION__ = '0.9.7'
__VERSION__ = '1.0.0b1'


def read_md(f):
Expand All @@ -16,11 +19,22 @@ def read_md(f):
except:
REQUIREMENTS = None

if sys.argv[-1] == 'publish':
if os.system("pip freeze | grep twine"):
print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
os.system("twine upload dist/*")
shutil.rmtree('build')
shutil.rmtree('dist')
sys.exit()


setup(
name='django-arctic',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
Expand Down

0 comments on commit bb3587d

Please sign in to comment.