Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #63 from ltworf/fix_setup
Browse files Browse the repository at this point in the history
Switch to setuptools and other fixes
  • Loading branch information
ltworf authored Oct 7, 2023
2 parents b6c859a + fb29514 commit d0a0284
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- Fix version check
- Add support for localization
- Add Italian localization
- Use setuptools because python dropped distutil -_-'

3.0
- UI shows different colours for different types
Expand Down
47 changes: 25 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,58 @@ deb-pkg: dist
mkdir deb-pkg
mv /tmp/relational* /tmp/python3-relational_*.deb deb-pkg
$(RM) -r /tmp/relational
lintian --pedantic -E --color auto -i -I deb-pkg/*changes

.PHONY: dist
dist: clean
rm -rf /tmp/relational/
rm -rf /tmp/relational-*
$(RM) -r /tmp/relational/
$(RM) -r /tmp/relational-*
mkdir /tmp/relational/
cp -R * /tmp/relational/
rm -rf /tmp/relational/windows
rm -rf /tmp/relational/debian/
$(RM) -r /tmp/relational/windows
$(RM) -r /tmp/relational/debian/

#mv /tmp/relational /tmp/relational-`./relational.py -v | grep Relational | cut -d" " -f2`
#mv /tmp/relational /tmp/relational-`head -1 CHANGELOG`
#(cd /tmp; tar -zcf relational.tar.gz relational-*/)
(cd /tmp; tar -zcf relational.tar.gz relational/)
mv /tmp/relational.tar.gz ./relational_`./relational.py -v | grep Relational | cut -d" " -f2`.orig.tar.gz
gpg --sign --armor --detach-sign ./relational_`./relational.py -v | grep Relational | cut -d" " -f2`.orig.tar.gz
mv /tmp/relational.tar.gz ./relational_`head -1 CHANGELOG`.orig.tar.gz
gpg --sign --armor --detach-sign ./relational_`head -1 CHANGELOG`.orig.tar.gz

.PHONY: clean
clean:
$(RM) -r deb-pkg
rm -rf `find -name "*~"`
rm -rf `find -name "*pyc"`
rm -rf `find -name "*pyo"`
rm -rf relational*.tar.gz
rm -rf relational*.tar.gz.asc
rm -rf data
rm -rf *tar.bz
rm -rf *.deb
rm -f relational_gui/survey.py
rm -f relational_gui/maingui.py
rm -f relational_gui/rel_edit.py
rm -f relational_gui/resources.py
$(RM) -r `find -name "*~"`
$(RM) -r `find -name "*pyc"`
$(RM) -r `find -name "*pyo"`
$(RM) -r relational*.tar.gz
$(RM) -r relational*.tar.gz.asc
$(RM) -r data
$(RM) -r *tar.bz
$(RM) -r *.deb
$(RM) relational_gui/survey.py
$(RM) relational_gui/maingui.py
$(RM) relational_gui/rel_edit.py
$(RM) relational_gui/resources.py
$(RM) po/*.mo
$(RM) -r build
$(RM) -r *.egg-info

.PHONY: install-relational-cli
install-relational-cli:
python3 setup/relational-cli.setup.py install --root=$${DESTDIR:-/};
rm -rf build;
$(RM) -r build;
install -D relational.py $${DESTDIR:-/}/usr/bin/relational-cli
install -D relational-cli.1 $${DESTDIR:-/}/usr/share/man/man1/relational-cli.1

.PHONY: install-python3-relational
install-python3-relational: install_translations
python3 setup/python3-relational.setup.py install --root=$${DESTDIR:-/};
rm -rf build;
$(RM) -r build;

.PHONY: install-relational
install-relational:
python3 setup/relational.setup.py install --root=$${DESTDIR:-/};
rm -rf build;
$(RM) -r build;
install -D relational.py $${DESTDIR:-/}/usr/bin/relational
install -m0644 -D relational.desktop $${DESTDIR:-/}/usr/share/applications/relational.desktop
install -m0644 -D relational_gui/resources/relational.png $${DESTDIR:-/}/usr/share/pixmaps/relational.png
Expand Down
4 changes: 3 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ relational (3.1-1) unstable; urgency=low
* New upstream release
* Fix debian/watch
* Switch distutils to setuptools
* Improved clean in the upstream makefile
* Bump Standards-Version: 4.6.2

-- Salvo 'LtWorf' Tomaselli <[email protected]> Son, 20 Sep 2020 21:40:29 +0200
-- Salvo 'LtWorf' Tomaselli <[email protected]> Sat, 07 Oct 2023 09:16:09 +0200

relational (3.0-1) unstable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Priority: optional
Maintainer: Salvo 'LtWorf' Tomaselli <[email protected]>
Build-Depends: debhelper-compat (= 13), debhelper (>= 13), python3, dh-python, python3-xtermcolor, pyqt5-dev-tools,
python3-setuptools, python3-typedload
Standards-Version: 4.5.0
Standards-Version: 4.6.2
X-Python3-Version: >= 3.8
Homepage: https://ltworf.github.io/relational/
Rules-Requires-Root: no
Expand Down
1 change: 0 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SHELL=sh -e
dh $@ --with python3

clean:
rm -rf build *.egg-info
dh $@

override_dh_auto_install:
Expand Down
4 changes: 2 additions & 2 deletions setup/installer_common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Relational
# Copyright (C) 2008-2020 Salvo "LtWorf" Tomaselli
# Copyright (C) 2008-2023 Salvo "LtWorf" Tomaselli
#
# Relational is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -16,7 +16,7 @@
#
# author Salvo "LtWorf" Tomaselli <[email protected]>

from distutils.core import setup
from setuptools import setup

def c_setup(name):
setup(
Expand Down

0 comments on commit d0a0284

Please sign in to comment.