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
|
||||
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!
|
||||
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' \
|
||||
--description 'Library for robot used in the competition' \
|
||||
--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 "python3-numpy" \
|
||||
-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-upstream-changelog changelog \
|
||||
|
|
|
@ -1,29 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/python3
|
||||
import setuptools
|
||||
import os
|
||||
|
||||
base_dir = os.path.dirname(__file__)
|
||||
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 = ""
|
||||
print("Using version: {str(os.environ['VERSION'])}")
|
||||
|
||||
setuptools.setup(
|
||||
name="complib",
|
||||
version=str(os.environ["VERSION"]),
|
||||
author="F-WuTs",
|
||||
author_email="joel.klimont@comp-air.at",
|
||||
description="",
|
||||
summary="Robot client library for the compAIR competition",
|
||||
platforms=["any"],
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url="https://github.com/F-WuTS/compLIB",
|
||||
packages=setuptools.find_packages(),
|
||||
include_package_data=True,
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"License :: Other/Proprietary License",
|
||||
"Operating System :: Unix"
|
||||
],
|
||||
|
|
|
@ -3,11 +3,11 @@ fpm \
|
|||
-m '"Joel Klimont" <joel.klimont@gmail.com>' \
|
||||
--license 'proprietary' \
|
||||
--description 'Library for robot used in the competition' \
|
||||
--url "https://github.com/F-WuTS/compLIB" \
|
||||
--deb-priority "optional" \
|
||||
--deb-systemd "compsrv.service" \
|
||||
--after-install postinstall.sh \
|
||||
--after-upgrade postinstall.sh \
|
||||
-p compsrv-1.0.0-0-any.deb \
|
||||
--name compsrv \
|
||||
--version 1.0.0-0 \
|
||||
--architecture all \
|
||||
|
|
Reference in a new issue