Skip to content

Commit f1191f0

Browse files
committed
various fixes to packaging after py3 was added
1 parent b963d63 commit f1191f0

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

admin/docker/Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# version of problemtools to be built (default is latest version of
66
# develop branch on GitHub)
77

8-
FROM ubuntu:19.04
8+
FROM ubuntu:18.04
99

1010
LABEL maintainer="austrin@kattis.com"
1111

admin/docker/Dockerfile.minimal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# PROBLEMTOOLS_VERSION but this is not checked.)
1111

1212
ARG PROBLEMTOOLS_VERSION=develop
13-
FROM ubuntu:19.04
13+
FROM ubuntu:18.04
1414

1515
LABEL maintainer="austrin@kattis.com"
1616

debian/control

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ Source: kattis-problemtools
22
Section: devel
33
Priority: optional
44
Maintainer: Per Austrin <austrin@kattis.com>
5-
Build-Depends: debhelper (>= 8.0.0), g++ (>= 4.8), dh-python, python3 (>=3.7), python3-setuptools, pyton3-pytest, python3-yaml, python (>= 2.6.6-3~), python-setuptools, python-pytest, python-yaml, libboost-regex-dev, libgmp-dev, automake, autoconf
5+
Build-Depends: debhelper (>= 8.0.0), g++ (>= 4.8), dh-python, python3, python3-setuptools, python3-pytest, python3-yaml, python (>= 2.6.6-3~), python-setuptools, python-pytest, python-yaml, libboost-regex-dev, libgmp-dev, automake, autoconf
66
Standards-Version: 3.9.4
77
Homepage: https://github.com/Kattis/problemtools
8-
X-Python3-Version: 3.7
98

109
Package: kattis-problemtools
1110
Architecture: any

debian/rules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ export PYBUILD_AFTER_CLEAN=make -C support distclean
1111
export PYBUILD_TEST_PYTEST=1
1212
export no_proxy=github.com
1313

14+
# FIXME: while we're building for both py2 and py3, we get a clash
15+
# with the CLI scripts. The following Workaround puts the py3 CLI
16+
# scripts somewhere else where they don't do any harm, so that the
17+
# main CLI scripts are the py2 ones for now. Once we drop py2 support
18+
# we also drop this line.
19+
export PYBUILD_INSTALL_ARGS_python3=--install-scripts=/usr/lib/problemtools/bin/
20+
1421
%:
1522
dh $@ --with python3,python2 --buildsystem=pybuild

problemtools/languages.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import fnmatch
66
import re
77
import string
8-
from six import string_types
98

109
from . import config
1110

@@ -80,7 +79,7 @@ def update(self, values):
8079
'Language %s: priority must be integer but is %s.'
8180
% (self.lang_id, type(value)))
8281
else:
83-
if not isinstance(value, string_types):
82+
if not isinstance(value, str):
8483
raise LanguageConfigError(
8584
'Language %s: %s must be string but is %s.'
8685
% (self.lang_id, key, type(value)))
@@ -213,7 +212,7 @@ def update(self, data):
213212
% (type(data)))
214213

215214
for (lang_id, lang_spec) in data.items():
216-
if not isinstance(lang_id, string_types):
215+
if not isinstance(lang_id, str):
217216
raise LanguageConfigError(
218217
'Config file error: language IDs must be strings, but %s is %s.'
219218
% (lang_id, type(lang_id)))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def get_version():
8181
include_package_data=True,
8282
install_requires=[
8383
'PyYAML',
84-
'plasTeX==1.0;python_version<"3"',
84+
'plasTeX<=1.0;python_version<"3"',
8585
'plasTeX>=2.0;python_version>="3"'
8686
],
8787
# Temporarily disabled, see setup.cfg

0 commit comments

Comments
 (0)