Commit 7431a01f authored by chris's avatar chris

Add debian packaging.

parent 0f771dad
......@@ -2,7 +2,5 @@
*.sqlite
*~
env
flyer/settings.py
page/static/media/images
page/static/media/files
./static
staticroot
media
flyers (0.20140711) UNRELEASED; urgency=low
* Initial release.
-- Christophe Siraut <d@tobald.eu.org> Mon, 14 Jul 2014 17:18:01 +0200
Source: flyers
Section: web
Priority: optional
Maintainer: Christophe Siraut <d@tobald.eu.org>
Build-Depends: debhelper (>= 9),
dh-python,
python-all (>= 2.6.6-3~),
python-sphinx,
python-django (>= 1.6)
Homepage: https://flyers.domainepublic.net
Vcs-Git: http://git.domainepublic.net/git/flyers.git/
Vcs-Browser: http://git.domainepublic.net/?p=flyers.git
Package: python-flyers
Section: python
Architecture: all
Depends: ${python:Depends},
${misc:Depends}
Recommends: python-ldap
Description: Python libraries of Flyers
Flyers aims to provide weblog for artists
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Flyers
Source: http://git.domainepublic.net/?p=flyers.git
Files: *
Copyright: 2013 Christophe Siraut <d@tobald.eu.org>
License: GPL-2.0+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
#!/usr/bin/make -f
NAME=flyers
#export PYBUILD_NAME=$(NAME)
export DH_VERBOSE=1
%:
dh $@ --with python2,sphinxdoc --buildsystem=pybuild
override_dh_auto_test:
./manage.py test flyers content general
......@@ -63,7 +63,7 @@ WSGI_APPLICATION = 'flyers.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'NAME': os.path.join(BASE_DIR, 'db.sqlite'),
}
}
......@@ -85,9 +85,9 @@ USE_TZ = True
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_ROOT = os.path.join(BASE_DIR, 'staticroot')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
CKEDITOR_UPLOAD_PATH = os.path.join(BASE_DIR, 'media', 'uploads')
from django.conf import global_settings
......
File mode changed from 100644 to 100755
#!/usr/bin/env python
from distutils.core import setup
import os
import re
def find_packages(dirs):
p = []
for d in dirs:
p.extend([
'.'.join(directory.split(os.sep))
for directory, _, files in os.walk(d)
if '__init__.py' in files
])
return p
def find_package_data(basedir):
pkgdata = {}
pkgdir = {}
EXCLUDE_FROM_DATA=('.py', '.pyc', '.pyo')
for directory, _, files in os.walk(basedir):
package = '.'.join(directory.split(os.sep))
if '__init__.py' in files:
# Record real packages and their directories
pkgdata[package] = [
f for f in files
if not f.endswith(EXCLUDE_FROM_DATA)
]
pkgdir[package] = directory
else:
# Find parent package
while package not in pkgdata and package:
package = ".".join(package.split(".")[:-1])
# Add data files relative to their parent package
reldir = os.path.relpath(directory, pkgdir[package])
pkgdata[package].extend(
os.path.join(reldir, f)
for f in files
if not f.endswith(EXCLUDE_FROM_DATA)
)
return pkgdata
with open('debian/changelog') as f:
res = re.search('\((\d.*)\)', f.readline())
version = res.group(1)
setup(
name='Flyers',
version=version,
description='Flyers web application',
author='Christophe Siraut',
author_email='d@tobald.eu.org',
url='http://flyers.domainepublic.net/',
packages=find_packages([
'flyers',
'general',
'content',
]),
package_data=dict(
find_package_data('flyers').items() +
find_package_data('general').items() +
find_package_data('content').items()
),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL) License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Utilities'
],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment