added env variable for setting a version
small changed in build scripts
This commit is contained in:
parent
222d274ea7
commit
d1e385a2a1
3 changed files with 15 additions and 14 deletions
|
@ -1,9 +1,12 @@
|
||||||
##!/usr/bin/zsh
|
##!/usr/bin/zsh
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
|
export VERSION="1.0.0-0"
|
||||||
|
|
||||||
|
# BE CAREFUL TO NOT BUILD IN A PYTHON VENV!
|
||||||
|
|
||||||
# be sure to change version if needed!
|
# be sure to change version if needed!
|
||||||
fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefix python3 \
|
fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefix python3 \
|
||||||
-m '"Joel Klimont" <joel.klimont@gmail.com>' \
|
-m '"Joel Klimont" <joel.klimont@comp-air.at>' \
|
||||||
--license 'proprietary' \
|
--license 'proprietary' \
|
||||||
--description 'Library for robot used in the competition' \
|
--description 'Library for robot used in the competition' \
|
||||||
--after-install postinstall.sh \
|
--after-install postinstall.sh \
|
||||||
|
@ -30,7 +33,12 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi
|
||||||
-d "libatlas-base-dev" \
|
-d "libatlas-base-dev" \
|
||||||
-d "python3-numpy" \
|
-d "python3-numpy" \
|
||||||
-d "ffmpeg" \
|
-d "ffmpeg" \
|
||||||
-v 1.0.0-1 -t deb setup.py
|
-v $VERSION -t deb setup.py
|
||||||
|
|
||||||
|
mkdir build_extract
|
||||||
|
mv python3-complib_"$VERSION"_all.deb build_extract
|
||||||
|
cd build_extract
|
||||||
|
ar -xv python3-complib_"$VERSION"_all.deb
|
||||||
|
|
||||||
# --deb-changelog changelog \
|
# --deb-changelog changelog \
|
||||||
# --deb-upstream-changelog changelog \
|
# --deb-upstream-changelog changelog \
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/python3
|
||||||
import setuptools
|
import setuptools
|
||||||
import os
|
import os
|
||||||
|
|
||||||
base_dir = os.path.dirname(__file__)
|
print("Using version: {str(os.environ['VERSION'])}")
|
||||||
readme_path = os.path.join(base_dir, "README.md")
|
|
||||||
if os.path.exists(readme_path):
|
|
||||||
with open(readme_path) as stream:
|
|
||||||
long_description = stream.read()
|
|
||||||
else:
|
|
||||||
long_description = ""
|
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="complib",
|
name="complib",
|
||||||
|
version=str(os.environ["VERSION"]),
|
||||||
author="F-WuTs",
|
author="F-WuTs",
|
||||||
author_email="joel.klimont@comp-air.at",
|
author_email="joel.klimont@comp-air.at",
|
||||||
description="",
|
description="",
|
||||||
summary="Robot client library for the compAIR competition",
|
summary="Robot client library for the compAIR competition",
|
||||||
platforms=["any"],
|
platforms=["any"],
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
url="https://github.com/F-WuTS/compLIB",
|
url="https://github.com/F-WuTS/compLIB",
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.9",
|
||||||
"License :: Other/Proprietary License",
|
"License :: Other/Proprietary License",
|
||||||
"Operating System :: Unix"
|
"Operating System :: Unix"
|
||||||
],
|
],
|
||||||
|
|
|
@ -3,11 +3,11 @@ fpm \
|
||||||
-m '"Joel Klimont" <joel.klimont@gmail.com>' \
|
-m '"Joel Klimont" <joel.klimont@gmail.com>' \
|
||||||
--license 'proprietary' \
|
--license 'proprietary' \
|
||||||
--description 'Library for robot used in the competition' \
|
--description 'Library for robot used in the competition' \
|
||||||
|
--url "https://github.com/F-WuTS/compLIB" \
|
||||||
--deb-priority "optional" \
|
--deb-priority "optional" \
|
||||||
--deb-systemd "compsrv.service" \
|
--deb-systemd "compsrv.service" \
|
||||||
--after-install postinstall.sh \
|
--after-install postinstall.sh \
|
||||||
--after-upgrade postinstall.sh \
|
--after-upgrade postinstall.sh \
|
||||||
-p compsrv-1.0.0-0-any.deb \
|
|
||||||
--name compsrv \
|
--name compsrv \
|
||||||
--version 1.0.0-0 \
|
--version 1.0.0-0 \
|
||||||
--architecture all \
|
--architecture all \
|
||||||
|
|
Reference in a new issue