Skip to content

Commit

Permalink
adapt for python ins/uns
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraheim committed Jun 26, 2024
1 parent 910e436 commit db27e77
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ cmake_install.cmake
configure
configure.ac
.vscode/settings.json
dist
*.egg-info
id_*
33 changes: 33 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BUILDSOURCES=..
BUILD=build
CMAKE=cmake
NINJA=ninja
TWINE=twine
PREFIX=$$HOME/local
PYTHON3=python3
MINPYTHON=3.8
Expand Down Expand Up @@ -162,6 +163,38 @@ py3: ; $(MAKE) $(PY3).type $(PY3).pep8
py2: ; $(MAKE) $(PY2).type $(PY2).pep8
py1: ; $(MAKE) $(PY1).type $(PY1).pep8

# .....................................
README: README.MD GNUmakefile
cat README.MD | sed -e "/\\/badge/d" -e /^---/q > README
setup.py: GNUmakefile
{ echo '#!/usr/bin/env python3' \
; echo 'import setuptools' \
; echo 'setuptools.setup()' ; } > setup.py
chmod +x setup.py
setup.py.tmp: GNUmakefile
echo "import setuptools ; setuptools.setup()" > setup.py

bui build-tools:
rm -rf build dist *.egg-info
$(MAKE) $(PARALLEL) README setup.py
# pip install --root=~/local . -v
$(PYTHON3) setup.py sdist
- rm -v setup.py README
$(TWINE) check dist/*
: $(TWINE) upload dist/*

ins install-tools:
$(MAKE) setup.py
$(PYTHON3) -m pip install --no-compile --user .
rm -v setup.py
$(MAKE) show-setup | sed -e "s|[.][.]/[.][.]/[.][.]/bin|$$HOME/.local/bin|"
sho show-setup:
python3 -m pip show -f $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.cfg)
uns uninstall-tools: setup.py
$(MAKE) setup.py
$(PYTHON3) -m pip uninstall -v --yes $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.cfg)
rm -v setup.py

# extras ..............................
auto:
- rm -v configure configure.ac
Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
[metadata]
name = zziplib-tools
version = 0.13.77
license = APL
license = LGPL
license_files =
LICENSE
COPYING.LIB
author = Guido U. Draheim
author-email = [email protected]
home-page = https://github.com/gdraheim/zziplib
Expand All @@ -22,8 +22,8 @@ scripts =
docs/toolstests.py

[options.data_files]
data =
LICENSE
share/zziplib =
COPYING.LIB
README.MD

[bdist_wheel]
Expand Down

0 comments on commit db27e77

Please sign in to comment.