Commit 93eaf5fe5f8538b4c0ed5496fb522566f46e3a28
1 parent
ca17f141
Exists in
master
Testing for pw3270's SDK path when building on windows.
Showing
1 changed file
with
13 additions
and
4 deletions
Show diff stats
setup.py
1 | -from distutils.core import setup, Extension | |
1 | +from distutils.core import setup, Extension, os | |
2 | +import platform | |
3 | + | |
4 | +include_dirs = ['src/include'] | |
5 | +library_dirs = [] | |
6 | + | |
7 | +if platform.system() == 'Windows': | |
8 | + include_dirs.append(os.getenv('PW3270_SDK_PATH') + '/include') | |
9 | + library_dirs.append(os.getenv('PW3270_SDK_PATH') + '/lib') | |
2 | 10 | |
3 | 11 | tn3270 = Extension( |
4 | 12 | 'tn3270', |
5 | 13 | define_macros = [ |
6 | - ('PACKAGE_NAME', '\"python-tn3270\"'), | |
14 | + ('PACKAGE_NAME', '\"python3-tn3270\"'), | |
7 | 15 | ('PACKAGE_VERSION', '\"5.2\"') |
8 | 16 | ], |
9 | - include_dirs = ['src/include'], | |
17 | + include_dirs = include_dirs, | |
10 | 18 | libraries = ['ipc3270'], |
19 | + library_dirs=library_dirs, | |
11 | 20 | sources = [ |
12 | 21 | 'src/action/type.c', |
13 | 22 | 'src/module/init.c', |
... | ... | @@ -35,7 +44,7 @@ setup ( name = 'tn3270', |
35 | 44 | description = 'Python bindings for lib3270/pw3270.', |
36 | 45 | author = 'Perry Werneck', |
37 | 46 | author_email = 'perry.werneck@gmail.com', |
38 | - url = 'https://github.com/PerryWerneck/python-tn3270', | |
47 | + url = 'https://github.com/PerryWerneck/python3-tn3270', | |
39 | 48 | long_description = ''' |
40 | 49 | This is an extension allowing tn3270 acess for python applications |
41 | 50 | using lib3270 directly or ipc calls to an enabled pw3270 window. | ... | ... |