Add a __pkginfo__.py (closes #127412)

authorDenis Laxalde <denis.laxalde@logilab.fr>
changesetee654a4f71be
branchdefault
phasepublic
hiddenno
parent revision#9ef72f57fc4b Fix __all__ declaration in _utils.pyx so that MED*Error are correctly exported
child revision#b97fbb21a227 Use a regex to find the number of nodes from element name
files modified by this revision
__pkginfo__.py
libmed/__pkginfo__.py
setup.py
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1374477702 -7200
# Mon Jul 22 09:21:42 2013 +0200
# Node ID ee654a4f71be661c705dc17dcb4a0ce4d39b9d47
# Parent 9ef72f57fc4b04fb7bace9e5741ddf0474e1e1ed
Add a __pkginfo__.py (closes #127412)

diff --git a/__pkginfo__.py b/__pkginfo__.py
@@ -0,0 +1,1 @@
1 +libmed/__pkginfo__.py
2 \ No newline at end of file
diff --git a/libmed/__pkginfo__.py b/libmed/__pkginfo__.py
@@ -0,0 +1,70 @@
3 +# Copyright 2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
4 +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
5 +#
6 +# This file is part of python-libmed.
7 +#
8 +# python-libmed is free software: you can redistribute it and/or modify it under
9 +# the terms of the GNU Lesser General Public License as published by the Free
10 +# Software Foundation, either version 3 of the License, or (at your option)
11 +# any later version.
12 +#
13 +# python-libmed is distributed in the hope that it will be useful, but WITHOUT
14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 +# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
16 +# details.
17 +#
18 +# You should have received a copy of the GNU Lesser General Public License along
19 +# with python-libmed.  If not, see <http://www.gnu.org/licenses/>.
20 +
21 +"""python-libmed packaging information"""
22 +
23 +from distutils.extension import Extension
24 +
25 +modname = distname = "python-libmed"
26 +
27 +numversion = (0, 1, 0)
28 +version = '.'.join([str(num) for num in numversion])
29 +
30 +license = 'LGPL'
31 +
32 +description="Manipulation of MED files."
33 +
34 +web = "http://www.python-science.org/project/python-libmed"
35 +mailinglist = "mailto://python-projects@lists.logilab.org"
36 +
37 +author="Logilab S.A. (Paris, France)"
38 +author_email="contact@logilab.fr"
39 +
40 +classifiers=[
41 +  "Development Status :: 3 - Alpha",
42 +  "Intended Audience :: Developers",
43 +  "Intended Audience :: Science/Research",
44 +  "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
45 +  "Programming Language :: Python",
46 +  "Programming Language :: Cython",
47 +  "Topic :: Scientific/Engineering",
48 +  "Topic :: Scientific/Engineering :: Physics",
49 +  "Topic :: Software Development :: Libraries :: Python Modules"],
50 +
51 +debian_maintainer = "Denis Laxalde"
52 +debian_maintainer_email = "denis.laxalde@logilab.fr"
53 +
54 +packages     = ['libmed']
55 +package_data = {'libmed': ['doc/*']}
56 +
57 +ext_modules=[
58 +    Extension("libmed._file", ["libmed/_file.pyx"],
59 +              libraries=["medC"]),
60 +    Extension("libmed._mesh", ["libmed/_mesh.pyx"],
61 +              libraries=["medC"]),
62 +    Extension("libmed._field", ["libmed/_field.pyx"],
63 +              libraries=["medC"]),
64 +    Extension("libmed._parameter", ["libmed/_parameter.pyx"],
65 +              libraries=["medC"]),
66 +    Extension("libmed._profile", ["libmed/_profile.pyx"],
67 +              libraries=["medC"]),
68 +    Extension("libmed._medtypes", ["libmed/_medtypes.pyx"],
69 +              libraries=["medC"]),
70 +    Extension("libmed._utils", ["libmed/_utils.pyx"],
71 +              libraries=["medC"])
72 +]
diff --git a/setup.py b/setup.py
@@ -15,54 +15,25 @@
73  #
74  # You should have received a copy of the GNU Lesser General Public License along
75  # with python-libmed.  If not, see <http://www.gnu.org/licenses/>.
76 
77  from distutils.core import setup
78 -from distutils.extension import Extension
79  from Cython.Distutils import build_ext
80 -import os.path as osp
81 
82 -ext_modules=[
83 -    Extension("libmed._file", ["libmed/_file.pyx"],
84 -              libraries=["medC"]),
85 -    Extension("libmed._mesh", ["libmed/_mesh.pyx"],
86 -              libraries=["medC"]),
87 -    Extension("libmed._field", ["libmed/_field.pyx"],
88 -              libraries=["medC"]),
89 -    Extension("libmed._parameter", ["libmed/_parameter.pyx"],
90 -              libraries=["medC"]),
91 -    Extension("libmed._profile", ["libmed/_profile.pyx"],
92 -              libraries=["medC"]),
93 -    Extension("libmed._medtypes", ["libmed/_medtypes.pyx"],
94 -              libraries=["medC"]),
95 -    Extension("libmed._utils", ["libmed/_utils.pyx"],
96 -              libraries=["medC"])
97 -]
98 -
99 -def get_long_description(filename="README"):
100 -    filepath = osp.join(osp.dirname(__file__), filename)
101 -    with open(filepath, 'r') as f:
102 -        long_description = f.read()
103 -    return long_description
104 +from __pkginfo__ import (distname, version, license, description, web, author,
105 +                         author_email, classifiers, packages, package_data,
106 +                         ext_modules)
107 
108 
109 -setup(name="python-libmed",
110 -      version="0.1.0",
111 -      author="Denis Laxalde",
112 -      author_email="denis.laxalde@logilab.fr",
113 -      url="http://www.python-science.org/project/python-libmed",
114 -      description="Manipulation of MED files.",
115 -      long_description=get_long_description("README"),
116 -      classifiers=[
117 -          "Development Status :: 3 - Alpha",
118 -          "Intended Audience :: Developers",
119 -          "Intended Audience :: Science/Research",
120 -          "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
121 -          "Programming Language :: Python",
122 -          "Programming Language :: Cython",
123 -          "Topic :: Scientific/Engineering",
124 -          "Topic :: Scientific/Engineering :: Physics",
125 -          "Topic :: Software Development :: Libraries :: Python Modules"],
126 +setup(name=distname,
127 +      version=version,
128 +      license=license,
129 +      author=author,
130 +      author_email=author_email,
131 +      url=web,
132 +      description=description,
133 +      long_description=file("README").read(),
134 +      classifiers=classifiers,
135        cmdclass={"build_ext": build_ext},
136        ext_modules=ext_modules,
137 -      packages=['libmed'],
138 -      package_data={'libmed': ['doc/*']})
139 +      packages=packages,
140 +      package_data=package_data)