summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorThomas Goirand <thomas@goirand.fr>2014-07-03 15:24:19 +0800
committerThomas Goirand <thomas@goirand.fr>2014-07-03 15:43:25 +0800
commitd38fbe9fb1e61416038658f66402a9beb8c40629 (patch)
tree334db4b373c38a9133940a3cfd4aab089263abea /debian
parent943ad599d786fff3572b5173fa813f5a9a8c0195 (diff)
downloadfactory-boy-d38fbe9fb1e61416038658f66402a9beb8c40629.tar
factory-boy-d38fbe9fb1e61416038658f66402a9beb8c40629.tar.gz
Added Python3 support and sphinx doc.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/control46
-rw-r--r--debian/patches/disable-intersphinx.patch16
-rw-r--r--debian/patches/series1
-rw-r--r--debian/python-factory-boy-doc.doc-base9
-rwxr-xr-xdebian/rules25
6 files changed, 92 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 22ff278..3d54f3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ factory-boy (2.4.1-1) unstable; urgency=medium
* New upstream release.
* Fixed debian/copyright to include the current maintainer.
+ * Added Python 3 support.
+ * Added sphinx doc.
-- Thomas Goirand <zigo@debian.org> Thu, 03 Jul 2014 15:10:32 +0800
diff --git a/debian/control b/debian/control
index 32d7ab6..e599287 100644
--- a/debian/control
+++ b/debian/control
@@ -10,8 +10,15 @@ Uploaders: Loic Dachary (OuoU) <loic@debian.org>,
Build-Depends: debhelper (>= 9),
openstack-pkg-tools,
python-all (>=2.6.6-3~),
- python-setuptools
-Build-Depends-Indep: python-mock, python-unittest2
+ python-setuptools,
+ python-sphinx,
+ python3-all (>= 3.2),
+ python3-setuptools
+Build-Depends-Indep: python-django,
+ python-mock,
+ python-unittest2,
+ python3-django,
+ python3-mock
Standards-Version: 3.9.5
Homepage: https://github.com/rbarrois/factory_boy
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/factory-boy.git;a=summary
@@ -21,7 +28,7 @@ Package: python-factory-boy
Architecture: all
Pre-Depends: dpkg (>= 1.15.6~)
Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
-Description: test fixtures replacement based on thoughtbot's factory_girl for Ruby
+Description: test fixtures replacement based on factory_girl for Ruby - Python 2.x
factory_boy is a fixtures replacement based on thoughtbot's factory_girl. Like
factory_girl it has a straightforward definition syntax, support for multiple
build strategies (saved instances, unsaved instances, attribute dicts, and
@@ -29,3 +36,36 @@ Description: test fixtures replacement based on thoughtbot's factory_girl for Ru
including factory inheritance.
.
Django support is included, and support for other ORMs can be easily added.
+ .
+ This package provides the Python 2.x module.
+
+Package: python3-factory-boy
+Architecture: all
+Pre-Depends: dpkg (>= 1.15.6~)
+Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
+Description: test fixtures replacement based on factory_girl for Ruby - Python 3.x
+ factory_boy is a fixtures replacement based on thoughtbot's factory_girl. Like
+ factory_girl it has a straightforward definition syntax, support for multiple
+ build strategies (saved instances, unsaved instances, attribute dicts, and
+ stubbed objects), and support for multiple factories for the same class,
+ including factory inheritance.
+ .
+ Django support is included, and support for other ORMs can be easily added.
+ .
+ This package provides the Python 3.x module.
+
+Package: python-factory-boy-doc
+Section: doc
+Architecture: all
+Pre-Depends: dpkg (>= 1.15.6~)
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${sphinxdoc:Depends}
+Description: test fixtures replacement based on factory_girl for Ruby - doc
+ factory_boy is a fixtures replacement based on thoughtbot's factory_girl. Like
+ factory_girl it has a straightforward definition syntax, support for multiple
+ build strategies (saved instances, unsaved instances, attribute dicts, and
+ stubbed objects), and support for multiple factories for the same class,
+ including factory inheritance.
+ .
+ Django support is included, and support for other ORMs can be easily added.
+ .
+ This package provides the documentation.
diff --git a/debian/patches/disable-intersphinx.patch b/debian/patches/disable-intersphinx.patch
new file mode 100644
index 0000000..daa6cff
--- /dev/null
+++ b/debian/patches/disable-intersphinx.patch
@@ -0,0 +1,16 @@
+Description: Disable intersphinx
+ Do not use intersphinx to avoid network access during build.
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: not-needed
+Last-Update: 2014-07-03
+
+--- factory-boy-2.4.1.orig/docs/conf.py
++++ factory-boy-2.4.1/docs/conf.py
+@@ -29,7 +29,6 @@ sys.path.insert(0, os.path.dirname(os.pa
+ extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.extlinks',
+- 'sphinx.ext.intersphinx',
+ 'sphinx.ext.viewcode',
+ ]
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5b14d3d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+disable-intersphinx.patch
diff --git a/debian/python-factory-boy-doc.doc-base b/debian/python-factory-boy-doc.doc-base
new file mode 100644
index 0000000..f13686c
--- /dev/null
+++ b/debian/python-factory-boy-doc.doc-base
@@ -0,0 +1,9 @@
+Document: python-factory-boy
+Title: Factory Boy Documentation
+Author: Raphaƫl Barrois
+Abstract: Sphinx documentation for Factory Boy
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-factory-boy-doc/html/index.html
+Files: /usr/share/doc/python-factory-boy-doc/html/*
diff --git a/debian/rules b/debian/rules
index 99dbc84..a0f7e87 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,15 +1,32 @@
#!/usr/bin/make -f
-# export DH_VERBOSE=1
+PYTHONS:=$(shell pyversions -vr)
+PYTHON3S:=$(shell py3versions -vr)
UPSTREAM_GIT = git://github.com/rbarrois/factory_boy.git
-
include /usr/share/openstack-pkg-tools/pkgos.make
%:
- dh $@ --with python2 --buildsystem=python_distutils
+ dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc
+
+override_dh_auto_install:
+ set -e && for pyvers in $(PYTHONS); do \
+ python$$pyvers setup.py install --install-layout=deb \
+ --root $(CURDIR)/debian/python-factory-boy; \
+ done
+ set -e && for pyvers in $(PYTHON3S); do \
+ python$$pyvers setup.py install --install-layout=deb \
+ --root $(CURDIR)/debian/python3-factory-boy; \
+ done
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+ PYTHONPATH=. sphinx-build -b html docs $(CURDIR)/debian/python-factory-boy-doc/usr/share/doc/python-factory-boy-doc/html
+ dh_sphinxdoc -O--buildsystem=python_distutils
+endif
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
- python -W default setup.py test
+ set -e && for i in $(PYTHONS) $(PYTHON3S) ; do \
+ python$$i -W default setup.py test ; \
+ done
endif