diff options
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | pyproject.toml | 6 | ||||
-rw-r--r-- | setup.cfg | 39 | ||||
-rw-r--r-- | setup.py | 35 |
4 files changed, 51 insertions, 30 deletions
diff --git a/debian/control b/debian/control index 60a8631..33b1e60 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Maintainer: Olivier Gayot <olivier.gayot@sigexec.com> Section: python Priority: optional Build-Depends: python3-setuptools, + python3-build, dh-python, dh-sysuser, debhelper-compat (= 13), diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..374b58c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..6712f5d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,39 @@ +[metadata] +name = swiftstory +version = 0.1 +author = Olivier Gayot +author_email = olivier.gayot@sigexec.com + +description = SwiftStory game: We're not out of the woords yet +url = https://git.sigexec.com/cgit.cgi/swiftstory.git +classifiers = + Programming Language :: Python :: 3 + License :: BSD-3 + Operating System :: OS Independent + +[options] +packages = find: +python_requires = >=3.7 + +[options.data_files] +share/swiftstory/www/ = + usr/share/swiftstory/www/index.html + usr/share/swiftstory/www/swiftstory-config.js + usr/share/swiftstory/www/swiftstory-common.css + usr/share/swiftstory/www/swiftstory-common.js + usr/share/swiftstory/www/swiftstory-mobile.css + usr/share/swiftstory/www/swiftstory-mobile.html + usr/share/swiftstory/www/swiftstory-mobile.js +# TODO install jQuery using libjs-jquery + usr/share/swiftstory/www/jquery.js +# TODO install cards as package data instead +share/swiftstory/lang/en/cards = + usr/share/swiftstory/lang/en/cards/black.json + usr/share/swiftstory/lang/en/cards/white.json +share/swiftstory/lang/fr/cards = + usr/share/swiftstory/lang/fr/cards/black.json + usr/share/swiftstory/lang/fr/cards/white.json + +[options.entry_points] +console_scripts = + swiftstoryd = swiftstory.__main__:main @@ -1,34 +1,9 @@ -import os +""" Dummy setup.py to help pybuild figure out what to do until a Build-Depend +on dh-python-pep517 can be added. """ -from setuptools import setup, find_packages +from setuptools import setup -prefix = '/' -share_dir = 'usr/share/swiftstory/' -data_files = list() - -for n in os.walk('usr'): - if len(n[2]) == 0: - continue - - files = list() - for f in n[2]: - files.append(n[0] + '/' + f) - - data_files.append((prefix + n[0] + '/', files)) - -setup( - name = 'swiftstory', - description = "SwiftStory game: We're not out of the woods yet.", - version = '0.1', - author = 'Olivier Gayot', - author_email = 'olivier.gayot@sigexec.com', - packages = find_packages(), - data_files = data_files, - entry_points = { - 'console_scripts': [ - 'swiftstoryd = swiftstory.__main__:main', - ], - } -) +if __name__ == "__main__": + setup() |