Skip to content

Commit

Permalink
fix: Building of archive and RPM should work
Browse files Browse the repository at this point in the history
* It wasn't possible to build .tar.gz archive nor RPM using
  Makefile
  • Loading branch information
jirihnidek authored and m-horky committed Dec 16, 2024
1 parent ad3760f commit 133cf6a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKGNAME = iniparse
SPECVERSION=$(shell awk '/Version:/ { print $$2 }' python-${PKGNAME}.spec)
SETUPVERSION=$(shell awk -F\' '/VERSION =/ { print $$2 }' setup.py)
PKG_NAME=iniparse
SPEC_VERSION=$(shell awk '/Version:/ { print $$2 }' python-${PKG_NAME}.spec)
SETUP_VERSION=$(shell awk '/VERSION =/ { print $$3 }' setup.py)

clean:
rm -f *.pyc *.pyo *~ *.bak
Expand All @@ -10,10 +10,11 @@ clean:

archive:
python setup.py sdist -d .
@echo "The archive is in ${PKGNAME}-$(SETUPVERSION).tar.gz"
mv ${PKG_NAME}-${SETUP_VERSION}.tar.gz python-${PKG_NAME}-${SETUP_VERSION}.tar.gz
@echo "The archive is in python-${PKG_NAME}-${SETUP_VERSION}.tar.gz"

rpmbuild: archive
rpmbuild -ta ${PKGNAME}-$(SPECVERSION).tar.gz
rpmbuild -ta python-${PKG_NAME}-$(SPEC_VERSION).tar.gz

pychecker:
pychecker --stdlib iniparse/*py tests/*py

0 comments on commit 133cf6a

Please sign in to comment.