File: setup.py

package info (click to toggle)
python-cpl 0.7.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 484 kB
  • sloc: python: 2,882; ansic: 1,710; makefile: 89; sh: 3
file content (72 lines) | stat: -rw-r--r-- 2,556 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import os
from setuptools import setup, Extension

author = 'Ole Streicher'
email = 'python-cpl@liska.ath.cx'
license_ = 'GPL'
cpl_version = '0.7.4'
description = "Python interface for the ESO Common Pipeline Library"
long_description = '''\
This module can list, configure and execute CPL-based recipes from Python
(python2 and python3).  The input, calibration and output data can be
specified as FITS files or as ``astropy.io.fits`` objects in memory.

The ESO `Common Pipeline Library <http://www.eso.org/sci/software/cpl/>`_
(CPL) comprises a set of ISO-C libraries that provide a comprehensive,
efficient and robust software toolkit. It forms a basis for the creation of
automated astronomical data-reduction tasks. One of the features provided by
the CPL is the ability to create data-reduction algorithms that run as plugins
(dynamic libraries). These are called "recipes" and are one of the main
aspects of the CPL data-reduction development environment.
'''

pkgname = 'python-cpl'
baseurl = ('https://files.pythonhosted.org/packages/source/'
           '{0}/{1}/{1}-{2}.tar.gz'.format(pkgname[0], pkgname, cpl_version))
classifiers = '''Development Status :: 4 - Beta
Intended Audience :: Science/Research
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Operating System :: MacOS :: MacOS X
Operating System :: POSIX
Operating System :: Unix
Programming Language :: C
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Topic :: Scientific/Engineering :: Astronomy
'''.splitlines()


def create_version_file(cpl_version=cpl_version):
    with open(os.path.join('cpl', 'version.py'), 'w') as vfile:
        vfile.write("version = %s\n" % repr(cpl_version))
        vfile.write("author = %s\n" % repr(author))
        vfile.write("email = %s\n" % repr(email))
        vfile.write("license_ = %s\n" % repr(license_))


try:
    create_version_file()
except IOError:
    pass

module1 = Extension('cpl.CPL_recipe',
                    sources=['cpl/CPL_recipe.c', 'cpl/CPL_library.c'])

setup(
    name=pkgname,
    version=cpl_version,
    author=author,
    author_email=email,
    description=description,
    long_description=long_description,
    license=license_,
    url='https://pypi.org/project/%s/%s' % (pkgname, cpl_version),
    download_url='%s/%s-%s.tar.gz' % (baseurl, pkgname, cpl_version),
    classifiers=classifiers,
    python_requires='>=2.7',
    install_requires=['astropy'],
    provides=['cpl'],
    packages=['cpl'],
    ext_modules=[module1]
)