From cc7b2bb9aab7712bf5f7b8e48a38927cec6eacd9 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 20 Dec 2021 16:58:54 +0100 Subject: [PATCH] add raw and Debian python packaging (#59578) --- .gitignore | 1 + MANIFEST.in | 4 ++ Makefile | 1 + debian/control | 14 ++++- debian/libjs-godo.install | 2 +- debian/rules | 14 +---- setup.py | 109 +++++++++++++++++++++++++++++++++++ xstatic/__init__.py | 1 + xstatic/pkg/__init__.py | 1 + xstatic/pkg/godo/__init__.py | 40 +++++++++++++ 10 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 MANIFEST.in create mode 100755 setup.py create mode 100644 xstatic/__init__.py create mode 100644 xstatic/pkg/__init__.py create mode 100644 xstatic/pkg/godo/__init__.py diff --git a/.gitignore b/.gitignore index 0e4344e..d8bc208 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist/js/ +dist/*.gz node_modules/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..29e22e0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +recursive-include xstatic/pkg/godo/data *.css *.js *.map +include MANIFEST.in +include MANIFEST +include README.md diff --git a/Makefile b/Makefile index 3727135..adaff2c 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ DIST_FILES = dist/js/godo.js dist/js/godo.min.js dist/css/godo.css dist/js/godo. clean: rm -rf sdist + rm -rf xstatic/pkg/godo/data build: npm install diff --git a/debian/control b/debian/control index d0b14d6..07febd7 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: godo.js Maintainer: Benjamin Dauvergne Section: javascript Priority: optional -Build-Depends: debhelper-compat (= 12) +Build-Depends: debhelper-compat (= 12), dh-python, python3-setuptools, python3-all Standards-Version: 4.5.1 Vcs-Browser: https://git.entrouvert.org/godo.js Vcs-Git: https://git.entrouvert.org/godo.js @@ -15,3 +15,15 @@ Depends: ${misc:Depends} Recommends: javascript-common Multi-Arch: foreign Description: Wysiwyg HTML widget + +Package: python3-xstatic-godo +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends}, libjs-godo +Description: godo packaging for Python (Python 3 module) + godo javascript library packaged for setuptools (easy_install) / pip. + . + This package is intended to be used by **any** project that needs these files. + . + It intentionally does **not** provide any extra code except some metadata + **nor** has any extra requirements. You MAY use some minimal support code from + the XStatic base package, if you like. diff --git a/debian/libjs-godo.install b/debian/libjs-godo.install index 5a53708..e067d37 100644 --- a/debian/libjs-godo.install +++ b/debian/libjs-godo.install @@ -1 +1 @@ -godo.* usr/share/javascript/godo/ +xstatic/pkg/godo/data/* usr/share/javascript/godo/ diff --git a/debian/rules b/debian/rules index 0c9b94c..f562968 100755 --- a/debian/rules +++ b/debian/rules @@ -1,15 +1,7 @@ #!/usr/bin/make -f # -*- makefile -*- - +# +export PYBUILD_NAME=xstatic-godo %: - dh $@ - -#override_dh_auto_build: -# mkdir dist -# cp index.js dist/index.js -# patch -p1