diff --git a/MANIFEST.in b/MANIFEST.in index 9361e9d2b5e4ed876ffb8047835898926e6e4475..eb758555d885b8927ad5c098b9f21de402620523 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,3 +2,4 @@ include Makefile include src/*.c include include/*.h include README.md +include VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..f374f6662e9a1983e9b8a534a3295df618772ffe --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.9.1 diff --git a/install.sh b/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..b81adec9d44fd049d1fa0974e440ccc271e9dc3a --- /dev/null +++ b/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Script to install binarycpython in the current venv + +VERSION_NUMBER=$(cat "VERSION") +echo "installing binarcpython version $VERSION_NUMBER" + +python setup.py clean +pip uninstall binarycpython +python setup.py build --force +python setup.py sdist +pip install -v dist/binarycpython-$VERSION_NUMBER.tar.gz diff --git a/install_without_dependencies.sh b/install_without_dependencies.sh new file mode 100755 index 0000000000000000000000000000000000000000..2a7775c07c0991eb163c2e96bfa0a9217211ec87 --- /dev/null +++ b/install_without_dependencies.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Script to install binarycpython in the current venv + +VERSION_NUMBER=$(cat "VERSION") +echo "installing binarcpython version $VERSION_NUMBER" + +python setup.py clean +pip uninstall binarycpython +python setup.py build --force +python setup.py sdist +pip install --ignore-installed --no-dependencies -v dist/binarycpython-$VERSION_NUMBER.tar.gz diff --git a/setup.py b/setup.py index cac092170d2f73d37d656cf7e94031e81e8716c4..da0ff542bcdeba45c32009ec0ba45fcb402e058b 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,16 @@ import distutils.command.build # TODO: replace the tasks that call binary_c-config with a single function that handles the return status a bit better. +def version(): + """ + opens VERSION and returns version number + """ + + with open("VERSION") as file: + return file.read().strip() + +VERSION_NUMBER = version() + # Functions def readme(): """Opens readme file and returns content""" @@ -224,7 +234,7 @@ class CustomBuildCommand(distutils.command.build.build): setup( name="binarycpython", - version="0.9.1", + version=VERSION_NUMBER, description="""This is a python API for binary_c (versions {}) by David Hendriks, Rob Izzard and collaborators. Based on the initial set up by Jeff andrews.""".format( ",".join(REQUIRED_BINARY_C_VERSIONS), ",".join(REQUIRED_BINARY_C_VERSIONS),