Skip to content

Commit 96ca585

Browse files
author
Jan Fajerski
committed
build: replace version in setup.py.in; ignore setup.py
Signed-off-by: Jan Fajerski <[email protected]>
1 parent 93dd81e commit 96ca585

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
setup.py
2+
13
*.sw[pon]
24
*~
35
*#

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version:
1414
pyc:
1515
find srv/ -name '*.py' -exec python -m py_compile {} \;
1616
# deepsea-cli
17-
sed -i "s/DEVVERSION/"$(VERSION)"/" setup.py
17+
sed "s/DEVVERSION/"$(VERSION)"/" setup.py.in > setup.py
1818
python setup.py build
1919

2020
copy-files:
@@ -634,7 +634,6 @@ copy-files:
634634
-chown salt:salt $(DESTDIR)/srv/salt/ceph/configuration/files/ceph.conf.checksum || true
635635

636636
install: copy-files
637-
sed -i "s/DEVVERSION/"$(VERSION)"/" setup.py
638637
sed -i '/^sharedsecret: /s!{{ shared_secret }}!'`cat /proc/sys/kernel/random/uuid`'!' $(DESTDIR)/etc/salt/master.d/sharedsecret.conf
639638
chown salt:salt $(DESTDIR)/etc/salt/master.d/*
640639
echo "deepsea_minions: '*'" > /srv/pillar/ceph/deepsea_minions.sls
@@ -645,6 +644,7 @@ install: copy-files
645644
systemctl restart salt-api
646645
# deepsea-cli
647646
zypper -n install python-setuptools python-click
647+
sed "s/DEVVERSION/"$(VERSION)"/" setup.py.in > setup.py
648648
python setup.py install --root=$(DESTDIR)/
649649

650650
rpm: tarball test
@@ -656,7 +656,7 @@ tarball:
656656
$(eval TEMPDIR := $(shell mktemp -d))
657657
mkdir $(TEMPDIR)/deepsea-$(VERSION)
658658
git archive HEAD | tar -x -C $(TEMPDIR)/deepsea-$(VERSION)
659-
sed -i "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/setup.py
659+
sed "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/setup.py.in $(TEMPDIR)/deepsea-$(VERSION)/setup.py
660660
sed -i "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/deepsea.spec
661661
sed -i "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/srv/modules/runners/deepsea.py
662662
mkdir -p ~/rpmbuild/SOURCES

setup.py renamed to setup.py.in

File renamed without changes.

0 commit comments

Comments
 (0)