From d1e385a2a18116ecb96d86d698a29a16a58aa635 Mon Sep 17 00:00:00 2001 From: Joel Klimont Date: Tue, 4 Oct 2022 23:00:11 +0200 Subject: [PATCH] added env variable for setting a version small changed in build scripts --- client_s2/build_deb.sh | 12 ++++++++++-- client_s2/setup.py | 15 ++++----------- server_v2/build_deb.sh | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/client_s2/build_deb.sh b/client_s2/build_deb.sh index ec63053..73c6d7b 100755 --- a/client_s2/build_deb.sh +++ b/client_s2/build_deb.sh @@ -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" ' \ + -m '"Joel Klimont" ' \ --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 \ diff --git a/client_s2/setup.py b/client_s2/setup.py index 464b3f1..fb84e02 100644 --- a/client_s2/setup.py +++ b/client_s2/setup.py @@ -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" ], diff --git a/server_v2/build_deb.sh b/server_v2/build_deb.sh index 4f6404a..c34bd13 100755 --- a/server_v2/build_deb.sh +++ b/server_v2/build_deb.sh @@ -3,11 +3,11 @@ fpm \ -m '"Joel Klimont" ' \ --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 \