Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt committed Jun 23, 2020
1 parent bba39e5 commit 39dc6ad
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
"""Setup.py for small_small_hr."""
from os import path
import os
import sys

from setuptools import find_packages, setup

import small_small_hr as sshr

# read the contents of your README file
with open(
path.join(path.abspath(path.dirname(__file__)), "README.md"), encoding="utf-8"
os.path.join(os.path.abspath(os.path.dirname(__file__)), "README.md"),
encoding="utf-8",
) as f:
LONG_DESCRIPTION = f.read()

# convenience command to publish
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("rm -rf build/ *.egg-info/")
os.system("python setup.py sdist bdist_wheel")
os.system("twine upload dist/* --skip-existing")
print("You probably want to also tag the version now:")
print(f" git tag -a v{sshr.__version__} -m 'version {sshr.__version__}'")
print(" git push --tags")
sys.exit()

setup(
name="small-small-hr",
version=__import__("small_small_hr").__version__,
version=sshr.__version__,
description="Minimal human resource management app for Django",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 39dc6ad

Please sign in to comment.