Skip to content

Commit

Permalink
removed git stuff from setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
markusressel committed Oct 28, 2020
1 parent d245f9b commit a7a0ab4
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
import os
import subprocess

from setuptools import setup, find_packages

VERSION_NUMBER = "5.2.0"

GIT_BRANCH = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"])
GIT_BRANCH = GIT_BRANCH.decode() # convert to standard string
GIT_BRANCH = GIT_BRANCH.rstrip() # remove unnecessary whitespace

if GIT_BRANCH == "master":
DEVELOPMENT_STATUS = "Development Status :: 5 - Production/Stable"
VERSION_NAME = VERSION_NUMBER
elif GIT_BRANCH == "beta":
DEVELOPMENT_STATUS = "Development Status :: 4 - Beta"
VERSION_NAME = "%s-beta" % VERSION_NUMBER
elif GIT_BRANCH == "dev":
DEVELOPMENT_STATUS = "Development Status :: 3 - Alpha"
VERSION_NAME = "%s-dev" % VERSION_NUMBER
elif os.environ.get("TRAVIS_BRANCH", None) == os.environ.get("TRAVIS_TAG", None) == "v{}".format(VERSION_NUMBER):
# travis tagged release branch
DEVELOPMENT_STATUS = "Development Status :: 5 - Production/Stable"
VERSION_NAME = VERSION_NUMBER
else:
print("Unknown git branch, using pre-alpha as default")
DEVELOPMENT_STATUS = "Development Status :: 2 - Pre-Alpha"
VERSION_NAME = "%s-%s" % (VERSION_NUMBER, GIT_BRANCH)
DEVELOPMENT_STATUS = "Development Status :: 5 - Production/Stable"
VERSION_NAME = VERSION_NUMBER


def readme_type() -> str:
Expand Down

0 comments on commit a7a0ab4

Please sign in to comment.