diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..860fad9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/CartADS.egg-info diff --git a/CartADS.egg-info/PKG-INFO b/CartADS.egg-info/PKG-INFO deleted file mode 100644 index 30f8845..0000000 --- a/CartADS.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: CartADS -Version: 0.0.0 -Summary: UNKNOWN -Home-page: http://example.net/ -Author: Grand Lyon -Author-email: toto@example.net -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/CartADS.egg-info/SOURCES.txt b/CartADS.egg-info/SOURCES.txt deleted file mode 100644 index da32e77..0000000 --- a/CartADS.egg-info/SOURCES.txt +++ /dev/null @@ -1,8 +0,0 @@ -README -setup.py -CartADS.egg-info/PKG-INFO -CartADS.egg-info/SOURCES.txt -CartADS.egg-info/dependency_links.txt -CartADS.egg-info/top_level.txt -cartads/__init__.py -cartads/models.py \ No newline at end of file diff --git a/CartADS.egg-info/dependency_links.txt b/CartADS.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/CartADS.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/CartADS.egg-info/top_level.txt b/CartADS.egg-info/top_level.txt deleted file mode 100644 index de78169..0000000 --- a/CartADS.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -cartads diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..1922595 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include README +include MANIFEST.in +include VERSION diff --git a/cartads/migrations/0001_initial.py b/cartads/migrations/0001_initial.py index 404619e..dec6129 100644 --- a/cartads/migrations/0001_initial.py +++ b/cartads/migrations/0001_initial.py @@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('base', '0007_auto_20180129_1355'), + ('base', '0006_resourcestatus'), ] operations = [ diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..24ff027 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +passerelle-grandlyon-cartads (0-0) unstable; urgency=low + + * initial packaging. + + -- Frederic Peters Tue, 13 Mar 2018 09:17:07 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..dae2da4 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: passerelle-grandlyon-cartads +Maintainer: Frederic Peters +Section: python +Priority: optional +Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 9), python-django +Standards-Version: 3.9.1 + +Package: python-passerelle-grandlyon-cartads +Architecture: all +Depends: ${misc:Depends}, ${python:Depends}, python-passerelle +Description: Passerelle connector to Grand Lyon CartADS + . diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4647c9c --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python2 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/setup.py b/setup.py index 6d92d7e..304aa18 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,47 @@ #! /usr/bin/env python +import os +import subprocess + from setuptools import setup, find_packages +from distutils.command.sdist import sdist + +class eo_sdist(sdist): + def run(self): + 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) + if os.path.exists('VERSION'): + os.remove('VERSION') + +def get_version(): + if os.path.exists('VERSION'): + version_file = open('VERSION', 'r') + version = version_file.read() + version_file.close() + return version + if os.path.exists('.git'): + p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE) + result = p.communicate()[0] + if p.returncode == 0: + version = result.split()[0][1:] + version = version.replace('-', '.') + return version + return '0' + setup( - name='CartADS', + name='passerelle-grandlyon-cartads', + version=get_version(), author='Grand Lyon', author_email='toto@example.net', url='http://example.net/', packages=find_packages(), + cmdclass={ + 'sdist': eo_sdist, + } )