Skip to content

Commit 5d9befd

Browse files
committed
Swizzle based on python version
Include base files based on running version
1 parent b11b937 commit 5d9befd

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

python/MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
include python3/pyiptcdata.h
1+
include python3/pyiptcdata.h
2+
include python2/pyiptcdata.h

python/setup.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
import sys
2+
13
from setuptools import setup, Extension
24

3-
iptc = Extension('iptcdata', sources=['python3/pyiptcdata.c',
4-
'python3/pyiptcdatamod.c',
5-
'python3/pyiptcdataset.c'],
5+
v = '2'
6+
if (sys.version_info > (3, 0)):
7+
v = '3'
8+
9+
iptc = Extension('iptcdata', sources=['python%s/pyiptcdata.c' % (v),
10+
'python%s/pyiptcdatamod.c' % (v),
11+
'python%s/pyiptcdataset.c' % (v)],
612
libraries=['iptcdata'],
7-
depends=['python3/pyiptcdata.h'])
13+
depends=['python%s/pyiptcdata.h' % (v)])
814

915
setup (name = 'iptcdata',
1016
version = '1.0.4',
@@ -20,10 +26,5 @@
2026
under the GNU Library General Public License (GNU LGPL).
2127
2228
The library implements the standard described at http://www.iptc.org/IIM
23-
24-
The code itself was inspired by the libexif library:
25-
http://sourceforge.net/projects/libexif, written by Lutz Müller.
26-
Together, libexif and libiptcdata provide a complete metadata
27-
solution for image files.
2829
''',
2930
ext_modules = [iptc])

0 commit comments

Comments
 (0)