Get link arguments from pkg-config. Add more files.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,3 @@
|
||||
/build
|
||||
/dist
|
||||
/pycdio.pyc
|
||||
/pycdio_wrap.c
|
||||
/pyiso9660_wrap.c
|
||||
/*.pyc
|
||||
|
||||
9
Makefile
Normal file
9
Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
# Compatibility for us old-timers.
|
||||
PHONY=check test dist
|
||||
all: check
|
||||
dist:
|
||||
python ./setup.py sdist bdist
|
||||
check:
|
||||
nosetests
|
||||
test: check
|
||||
.PHONY: $(PHONY)
|
||||
44
NEWS
Normal file
44
NEWS
Normal file
@@ -0,0 +1,44 @@
|
||||
0.14
|
||||
- Convert to use setuptools
|
||||
|
||||
0.13
|
||||
2007-10-27
|
||||
|
||||
- Small bugfix
|
||||
|
||||
0.12
|
||||
2006-12-10
|
||||
|
||||
- Add get_msg()
|
||||
|
||||
- Add pathname_isofy() in iso9660.py
|
||||
|
||||
- Correct bugs in SWIG pathname_isofy() and close_tray()
|
||||
|
||||
- Correct bug in get_devices when there was only one device.
|
||||
|
||||
0.11
|
||||
2006-03-27
|
||||
|
||||
- Add ISO 9660 library
|
||||
* add example programs to extract a file from an ISO fileystem
|
||||
* add regression tsets
|
||||
|
||||
- Changes to make building outside of source tree (e.g. "make
|
||||
distcheck") work
|
||||
|
||||
- Include SWIG-derived files. In theory you don't need SWIG installed
|
||||
any more (although you do need a C compiler and libcdio installed).
|
||||
|
||||
- Remove bug in is_device()
|
||||
|
||||
- Fixes for Solaris and cygwin builds (compilation/linking flags)
|
||||
|
||||
- Minor SWIG changes to be more precise.
|
||||
|
||||
0.10
|
||||
2006-01-30
|
||||
|
||||
Initial Python wrapper
|
||||
|
||||
$Id: NEWS,v 1.8 2007/10/21 22:28:58 rocky Exp $
|
||||
12
setup.cfg
Normal file
12
setup.cfg
Normal file
@@ -0,0 +1,12 @@
|
||||
[nosetests]
|
||||
# Location of test programs. "where" can be given several times.
|
||||
# If "where is a directory, then that's the working directory.
|
||||
where=./test
|
||||
|
||||
# Show individual tests run
|
||||
verbosity=2
|
||||
|
||||
cover-package=nose
|
||||
# debug=nose.loader
|
||||
pdb=1
|
||||
detailed-errors=1
|
||||
28
setup.py
28
setup.py
@@ -6,6 +6,7 @@ distutils setup (setup.py) for pycdio
|
||||
|
||||
from setuptools import setup
|
||||
from distutils.core import Extension
|
||||
from subprocess import *
|
||||
|
||||
version = '0.14vc'
|
||||
|
||||
@@ -13,11 +14,34 @@ import os
|
||||
README = os.path.join(os.path.dirname(__file__), 'README.txt')
|
||||
long_description = open(README).read() + '\n\n'
|
||||
|
||||
# Find link args for libcdio and libiso9660 using pkg-config and add
|
||||
# collect them into a list for setup's ext_modules.
|
||||
libraries=[]
|
||||
link_args=[]
|
||||
for i, lib_name in enumerate(('libcdio', 'libiso9660',)):
|
||||
p = Popen(['pkg-config', '--libs', lib_name], stdout=PIPE)
|
||||
if p.returncode is None:
|
||||
link_args.append([p.communicate()[0]])
|
||||
libraries.append(None) # Above includes libcdio
|
||||
else:
|
||||
print ("Didn't the normal return code running pkg-config," +
|
||||
"got:\n\t%s" % p.returncode)
|
||||
short_libname = lib_name[3:] # Strip off "lib" from name
|
||||
print "Will try to add %s anyway." % short_libname
|
||||
link_args.append(None)
|
||||
libraries.append(short_libname) # Strip off "lib" frame name
|
||||
else:
|
||||
libcdio_link_args = None
|
||||
libcdio_library = ['cdio']
|
||||
|
||||
# FIXME: incorporate into above loop. E.g. using modules=[] var.
|
||||
pycdio_module = Extension('_pycdio',
|
||||
libraries=['cdio'],
|
||||
libraries=libraries[0],
|
||||
extra_link_args=link_args[0],
|
||||
sources=['swig/pycdio.i'])
|
||||
pyiso9660_module = Extension('_pyiso9660',
|
||||
libraries=['iso9660'],
|
||||
libraries=libraries[1],
|
||||
extra_link_args=link_args[1],
|
||||
sources=['swig/pyiso9660.i'])
|
||||
setup (name = 'pycdio',
|
||||
author = 'Rocky Bernstein',
|
||||
|
||||
2
swig/.gitignore
vendored
2
swig/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
/pycdio.py
|
||||
/pycdio_wrap.c
|
||||
/pyiso9660.py
|
||||
/pyiso9660_wrap.c
|
||||
|
||||
1
test/.gitignore
vendored
Normal file
1
test/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/*.pyc
|
||||
Reference in New Issue
Block a user