debian packaging

This commit is contained in:
Benjamin Dauvergne 2015-05-27 16:53:47 +02:00
parent 423a74702c
commit d0e6ae5828
15 changed files with 318 additions and 5 deletions

View File

@ -1,6 +1,8 @@
include README.rst
include README.md
recursive-include django_tables2/templates *
recursive-include django_tables2/static *
recursive-include django_tables2/locale *
recursive-include example/app/fixtures *
recursive-include example/templates *
include VERSION
include MANIFEST.in

102
debian/changelog vendored Normal file
View File

@ -0,0 +1,102 @@
django-tables (0.15.0-3) unstable; urgency=low
* Add patch from https://github.com/bradleyayers/django-tables2/pull/214 as
dont_call_managers.patch to fix problems with many to many fields. See
https://github.com/bradleyayers/django-tables2/issues/211 for details.
* Add patch from
https://github.com/luzfcb/django-tables2/commit/f3613c41208b0e7080777416f13ea2de6c65da02
as remove_sorteddict.patch to remove depreciated use of SortedDict.
See https://github.com/bradleyayers/django-tables2/issues/212 for details.
-- Brian May <bam@debian.org> Fri, 17 Oct 2014 09:54:38 +1100
django-tables (0.15.0-2) unstable; urgency=low
* Python3 package.
-- Brian May <bam@debian.org> Fri, 04 Apr 2014 09:42:10 +1100
django-tables (0.15.0-1) unstable; urgency=low
* New upstream version.
-- Brian May <bam@debian.org> Fri, 04 Apr 2014 08:55:48 +1100
django-tables (0.13.0-3) unstable; urgency=low
* Fix typo in debian/control, broke upgrades. Fixes: #717999.
-- Brian May <bam@debian.org> Sun, 28 Jul 2013 10:41:44 +1000
django-tables (0.13.0-2) unstable; urgency=low
* Set DPMT as Uploaders.
* Switch to dh_python2.
* Bump Standards version to 3.9.4.
* Bump debhelper Build-Depends to >= 8.1.0~.
* Rename to python-django-filter, provide transitional dummy package
* Build documentation with sphinx and move it to separate package
python-django-filter-doc.
* Change short and long description.
* Make dependencies on python-django versioned.
* Drop debian/pycompat.
* Add X-Python-Version.
* Use DEP5 format for d/copyright.
* Add d/watch file.
* Move Homepage field to source section.
-- Brian May <bam@debian.org> Thu, 20 Jun 2013 10:18:20 +1000
django-tables (0.13.0-1) unstable; urgency=low
* New upstream version.
* Requires Django 1.2 or newer.
-- Brian May <bam@debian.org> Sun, 21 Oct 2012 10:47:50 +1100
django-tables (0.11.0-1) unstable; urgency=low
* New upstream version.
-- Brian May <bam@debian.org> Tue, 18 Sep 2012 09:41:45 +1000
django-tables (0.10.2-2) unstable; urgency=low
* Don't import views.py by default, breaks Python 2.6.
* Fix incorrect depreciation warning.
-- Brian May <bam@debian.org> Sun, 01 Apr 2012 09:09:03 +1000
django-tables (0.10.2-1) unstable; urgency=low
* New upstream version.
* Bugs fixed.
* Django 1.4 support.
-- Brian May <bam@debian.org> Wed, 28 Mar 2012 12:21:19 +1100
django-tables (0.9.6-2) unstable; urgency=low
* Resolve compatibility issues with Debian/squeeze.
-- Brian May <bam@debian.org> Tue, 13 Mar 2012 11:55:12 +1100
django-tables (0.9.6-1) unstable; urgency=low
* New upstream version from
https://github.com/bradleyayers/django-tables2 fork
* Major incompatible non-backwards compatible changes.
-- Brian May <bam@debian.org> Mon, 05 Mar 2012 14:23:32 +1100
django-tables (0.2.1-2) unstable; urgency=low
* Remove redundant line from debian/rules.
-- Brian May <bam@debian.org> Fri, 08 Apr 2011 10:34:18 +1000
django-tables (0.2.1-1) unstable; urgency=low
* Initial release. Closes: #619194.
-- Brian May <bam@debian.org> Mon, 28 Mar 2011 11:37:40 +1100

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
7

53
debian/control vendored Normal file
View File

@ -0,0 +1,53 @@
Source: django-tables
Section: python
Priority: optional
Maintainer: Brian May <bam@debian.org>
Uploaders: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Build-Depends: debhelper (>=8.1.0), dh-python,
python-all (>= 2.6.6-3~), python-django (>= 1.4.5), python-setuptools, python-six,
python3-all, python3-django (>= 1.4.5), python3-setuptools, python3-six,
Build-Depends-Indep: python-sphinx (>= 1.0.7+dfsg-1~), python-doc, python-django-doc
Standards-Version: 3.9.5
X-Python-Version: >= 2.6
Homepage: https://github.com/bradleyayers/django-tables2/
Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/django-tables/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/django-tables/trunk/
Package: python-django-tables2
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-django (>= 1.4.5)
Suggests: python-django-tables2-doc
Replaces: django-tables (<< 0.13.0-2)
Breaks: django-tables (<< 0.13.0-2)
Description: Table/data-grid framework for Django
django-tables2 simplifies the task of turning sets of data into HTML tables. It
has native support for pagination and sorting. It does for HTML tables what
``django.forms`` does for HTML forms.
Package: python3-django-tables2
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, python3-django (>= 1.4.5)
Suggests: python-django-tables2-doc
Description: Table/data-grid framework for Django
django-tables2 simplifies the task of turning sets of data into HTML tables. It
has native support for pagination and sorting. It does for HTML tables what
``django.forms`` does for HTML forms.
Package: python-django-tables2-doc
Section: doc
Architecture: all
Depends: ${misc:Depends}, ${sphinxdoc:Depends}, python-doc, python-django-doc
Description: Table/data-grid framework for Django (Documentation)
django-tables2 simplifies the task of turning sets of data into HTML tables. It
has native support for pagination and sorting. It does for HTML tables what
``django.forms`` does for HTML forms.
.
This package contains the documentation.
Package: django-tables
Depends: python-django-tables2, ${misc:Depends}
Architecture: all
Priority: extra
Section: oldlibs
Description: Table/data-grid framework for Django (transitional package)
This is a dummy package to aid switching to python-django-tables2.

38
debian/copyright vendored Normal file
View File

@ -0,0 +1,38 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: django-tables
Upstream-Contact: Alex Gaynor <alex.gaynor@gmail.com>
Source: https://github.com/bradleyayers/django-tables2/
Files: *
Copyright: 2008, Michael Elsdörfer <http://elsdoerfer.name>
License: BSD-django-tables
Files: debian/*
Copyright: 2011, Brian May <bam@debian.org>
License: BSD-django-tables
License: BSD-django-tables
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

1
debian/pycompat vendored Normal file
View File

@ -0,0 +1 @@
2

View File

@ -0,0 +1,9 @@
Document: python-django-tables2
Title: Python django-tables2 Documentation
Author: Michael Elsdörfer <http://elsdoerfer.name>
Abstract: This documentation gives an introduction to django-tables2.
Section: Programming/Python
Format: HTML
Index: /usr/share/doc/python-django-tables2-doc/html/index.html
Files: /usr/share/doc/python-django-tables2-doc/html/*.html

1
debian/python-django-tables2-doc.docs vendored Normal file
View File

@ -0,0 +1 @@
docs/.build/html

View File

@ -0,0 +1 @@
usr/share/doc/python-django-tables2-doc/html/_sources usr/share/doc/python-django-tables2-doc/rst

1
debian/python-django-tables2.docs vendored Normal file
View File

@ -0,0 +1 @@
README.md

17
debian/rules vendored Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
# -*- makefile -*-
export PYBUILD_NAME=django-tables2
%:
dh $@ --with python2
.PHONY: override_dh_auto_build
override_dh_auto_build:
dh_auto_build
.PHONY: override_dh_auto_test
override_dh_auto_test:
# Tests require attest which isn't in Debian yet.
# https://pypi.python.org/pypi/Attest/0.5.3
# Disabling tests for now.

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

1
debian/source/options vendored Normal file
View File

@ -0,0 +1 @@
extend-diff-ignore = "^(\.project|\.pydevproject)$"

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
version=3
https://pypi.python.org/packages/source/d/django-tables2/django-tables2-([\d\.]+)\.tar\.gz

View File

@ -1,15 +1,95 @@
#!/usr/bin/env python
import re
from setuptools import setup, find_packages
import subprocess
import sys
import os
import six
from distutils.core import setup
from setuptools import find_packages
from setuptools.command.install_lib import install_lib as _install_lib
from distutils.command.build import build as _build
from distutils.command.sdist import sdist
from distutils.cmd import Command
with open('django_tables2/__init__.py', 'rb') as f:
version = str(re.search('__version__ = "(.+?)"', f.read().decode('utf-8')).group(1))
class compile_translations(Command):
description = 'compile message catalogs to MO files via django \
compilemessages'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
from django.core.management import call_command
for dir in ('django_tables2',):
for path, dirs, files in os.walk(dir):
if 'locale' not in dirs:
continue
curdir = os.getcwd()
os.chdir(os.path.realpath(path))
call_command('compilemessages')
os.chdir(curdir)
except ImportError:
six.print_('!!! Please install Django >= 1.4 to build '
'translations')
class build(_build):
sub_commands = [('compile_translations', None)] + _build.sub_commands
class eo_sdist(sdist):
def run(self):
six.print_("creating VERSION file")
if os.path.exists('VERSION'):
os.remove('VERSION')
version = get_version()
version_file = open('VERSION', 'w')
version_file.write(version)
version_file.close()
sdist.run(self)
six.print_("removing VERSION file")
if os.path.exists('VERSION'):
os.remove('VERSION')
class install_lib(_install_lib):
def run(self):
self.run_command('compile_translations')
_install_lib.run(self)
def get_version():
'''Use the VERSION, if absent generates a version with git describe, if not
tag exists, take 0.0.0- and add the length of the commit log.
'''
if os.path.exists('VERSION'):
with open('VERSION', 'r') as v:
return v.read()
if os.path.exists('.git'):
p = subprocess.Popen(['git', 'describe', '--tags', '--dirty',
'--match=v*'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
result = p.communicate()[0]
if p.returncode == 0:
return result.split()[0][1:].replace('-', '.')
else:
return '0.0.0-%s' % len(
subprocess.check_output(['git', 'rev-list',
'HEAD']).splitlines())
return '0.0.0'
setup(
name='django-tables2',
version=version,
version=get_version(),
description='Table/data-grid framework for Django',
author='Bradley Ayers',
@ -37,4 +117,7 @@ setup(
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries',
],
cmdclass={'build': build, 'install_lib': install_lib,
'compile_translations': compile_translations, 'sdist':
eo_sdist},
)