Skip to content

Commit 4d4989c

Browse files
committed
fix debian package
1 parent ab3f7e7 commit 4d4989c

File tree

6 files changed

+32
-49
lines changed

6 files changed

+32
-49
lines changed

debian/build_deb.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,33 @@ then read -p "pip executeable: " pip
1818
else pip=$3
1919
fi
2020

21-
package="pyhp_"$version"_all"
21+
package="pyhp_${version}_all"
2222

2323
mkdir "$package"
2424

25-
# place config file, cache handlers and "executable"
26-
mkdir -p "$package/lib/pyhp/cache_handlers"
27-
cp ../cache_handlers/* "$package/lib/pyhp/cache_handlers"
28-
29-
mkdir "$package/etc"
30-
cp ../pyhp.conf "$package/etc"
25+
# place pyhp-core files
26+
mkdir -p "${package}/usr/lib/python3/dist-packages"
27+
$pip install --target "${package}/usr/lib/python3/dist-packages" --ignore-installed --no-compile "$wheel"
3128

32-
mkdir -p "$package/usr/bin"
33-
cp pyhp "$package/usr/bin"
34-
chmod +x "$package/usr/bin/pyhp"
29+
# place config file and "executable"
30+
mkdir "${package}/etc"
31+
cp ../pyhp.toml "${package}/etc"
3532

36-
# place pyhp-core files
37-
mkdir -p "$package/usr/lib/python3/dist-packages"
38-
$pip install --target "$package/usr/lib/python3/dist-packages" --ignore-installed $wheel
33+
mkdir -p "${package}/usr/bin"
34+
mv "${package}/usr/lib/python3/dist-packages/bin/pyhp" "${package}/usr/bin"
35+
rmdir "${package}/usr/lib/python3/dist-packages/bin"
36+
chmod +x "${package}/usr/bin/pyhp"
3937

4038
# place metadata files
4139
mkdir "$package/DEBIAN"
4240
# calculate installed size
43-
cat control | python3 format.py "$version" $(du -sk --apparent-size --exclude "DEBIAN" "$package" 2>/dev/null | cut -f1) > "$package/DEBIAN/control"
41+
cat control | python3 format.py "${version}" $(du -sk --apparent-size --exclude "DEBIAN" "${package}" 2>/dev/null | cut -f1) > "${package}/DEBIAN/control"
4442
cp conffiles "$package/DEBIAN"
4543

46-
mkdir -p "$package/usr/share/doc/pyhp"
47-
cp copyright "$package/usr/share/doc/pyhp"
48-
cp changelog "$package/usr/share/doc/pyhp/changelog.Debian"
49-
gzip -n --best "$package/usr/share/doc/pyhp/changelog.Debian"
44+
mkdir -p "${package}/usr/share/doc/pyhp"
45+
cp copyright "${package}/usr/share/doc/pyhp"
46+
cp changelog "${package}/usr/share/doc/pyhp/changelog.Debian"
47+
gzip -n --best "${package}/usr/share/doc/pyhp/changelog.Debian"
5048

5149
# generate md5sums file
5250
chdir "$package"
@@ -67,3 +65,5 @@ dpkg-deb --build "$package"
6765
rm -r "$package"
6866

6967
echo "Done"
68+
69+
exit 0

debian/changelog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
pyhp (2.2-1) stable; urgency=low
2+
3+
* sixth release
4+
* replace cache handlers with backends submodule
5+
* add unbounded version of memory cache
6+
* add files, zipfiles and memory backend
7+
* fix race condition in file cache
8+
* change config format to TOML
9+
10+
-- Eric Wolf <[email protected]> Sun, 14 Mar 2021 19:00:00 +0100
11+
112
pyhp (2.1-1) stable; urgency=low
213

314
* fifth release

debian/conffiles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/etc/pyhp.conf
1+
/etc/pyhp.toml

debian/pyhp

Lines changed: 0 additions & 28 deletions
This file was deleted.

pyhp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# package metadata
1515
# needs to be defined before .main is imported
16-
__version__ = "2.1"
16+
__version__ = "2.2"
1717
__author__ = "Eric Wolf"
1818
__maintainer__ = "Eric Wolf"
1919
__license__ = "GPLv3"

pyhp/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
argparser.add_argument(
6060
"name",
6161
type=str,
62-
help="name to be loaded from the caching hierarchy (omit for reading from stdin)",
62+
help="name to be loaded from the backend (omit for reading from stdin)",
6363
nargs="?",
6464
default="-"
6565
)

0 commit comments

Comments
 (0)