File: setup.py

package info (click to toggle)
python-cups 1.9.73-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 460 kB
  • sloc: ansic: 8,863; python: 325; makefile: 58
file content (68 lines) | stat: -rw-r--r-- 2,611 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
#!/usr/bin/python

## Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014  Red Hat, Inc
##  Author: Tim Waugh <twaugh@redhat.com>

## This program 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 program 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, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

"""This is a set of Python bindings for the libcups library from the
CUPS project.

>>> # Example of getting a list of printers
>>> import cups
>>> conn = cups.Connection ()
>>> printers = conn.getPrinters ()
>>> for printer in printers:
...     print printer, printers[printer]["device-uri"]
...
HP ipp://192.168.1.1:631/printers/HP
duplex ipp://192.168.1.1:631/printers/duplex
HP-LaserJet-6MP ipp://192.168.1.1:631/printers/HP-LaserJet-6MP
EPSON-Stylus-D78 usb://EPSON/Stylus%20D78
"""

from distutils.core import setup, Extension
import sys
VERSION="1.9.73"
libraries=["cups"]

if sys.platform == "darwin" or sys.platform.startswith("freebsd"):
	libraries.append ("iconv")

setup (name="pycups",
       version=VERSION,
       description="Python bindings for libcups",
       long_description=__doc__,
       maintainer="Tim Waugh",
       maintainer_email="twaugh@redhat.com",
       url="http://cyberelk.net/tim/software/pycups/",
       download_url="http://cyberelk.net/tim/data/pycups/",
       classifiers=[
		"Intended Audience :: Developers",
		"Topic :: Software Development :: Libraries :: Python Modules",
		"License :: OSI Approved :: GNU General Public License (GPL)",
		"Development Status :: 5 - Production/Stable",
		"Operating System :: Unix",
		"Programming Language :: C",
		"Programming Language :: Python",
		"Programming Language :: Python :: 2",
		"Programming Language :: Python :: 3",
		],
       license="GPLv2+",
       ext_modules=[Extension("cups",
                              ["cupsmodule.c", "cupsconnection.c",
                               "cupsppd.c", "cupsipp.c"],
                              libraries=libraries,
                              define_macros=[("VERSION", '"%s"' % VERSION)])])