Skip to content

Commit

Permalink
Switch kaboxer into a full-blown Python project
Browse files Browse the repository at this point in the history
  • Loading branch information
rhertzog committed Dec 10, 2020
1 parent 748ef77 commit 31ea390
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/kbxbuilder.1
/kbxbuilder.config.yaml.5
/kbxbuilder.apps.yaml.5
.ropeproject/
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.7.0
9 changes: 0 additions & 9 deletions debian/install

This file was deleted.

1 change: 1 addition & 0 deletions debian/kaboxer.examples
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kbx-hello
5 changes: 0 additions & 5 deletions debian/kaboxer.manpages

This file was deleted.

6 changes: 5 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/make -f

%:
dh $@ --with python3
dh $@ --with python3 --buildsystem=pybuild

execute_before_dh_auto_configure:
# Ensure we have the correct version in the Python metadata
dpkg-parsechangelog -SVersion >VERSION

override_dh_compress:
dh_compress -X kbx-hello
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
37 changes: 37 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = kaboxer
version = file:VERSION

[options]
packages = kaboxer
install_requires =
docker
dockerpty
GitPython
Jinja2
packaging
prompt_toolkit
requests
tabulate
yaml

[options.entry_points]
console_scripts =
kaboxer = kaboxer:main
kbxbuilder = kaboxer.builder:main

[options.data_files]
share/man/man1 =
kaboxer.1
kbxbuilder.1
share/man/man5 =
kaboxer.yaml.5
kbxbuilder.apps.yaml.5
kbxbuilder.config.yaml.5
/etc/sudoers.d = sudoers.d/kaboxer
bin = dh-kaboxer/dh_kaboxer
share/perl5/Debian/Debhelper/Buildsystem = dh-kaboxer/Buildsystem/kaboxer.pm
share/perl5/Debian/Debhelper/Sequence = dh-kaboxer/Sequence/kaboxer.pm
share/debhelper/autoscripts =
dh-kaboxer/postinst-kaboxer
dh-kaboxer/postrm-kaboxer
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/python3
import os
from distutils.command.clean import clean
from distutils.command.build import build
from setuptools import setup


class MyBuild(build):
def run(self):
# Build manual pages
os.system("make")
super().run()


class MyClean(clean):
def run(self):
# Clean manual pages
os.system("make clean")
super().run()


setup(cmdclass={'build': MyBuild, 'clean': MyClean})

0 comments on commit 31ea390

Please sign in to comment.