Commit 93eaf5fe5f8538b4c0ed5496fb522566f46e3a28

Authored by Perry Werneck
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
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 tn3270 = Extension( 11 tn3270 = Extension(
4 'tn3270', 12 'tn3270',
5 define_macros = [ 13 define_macros = [
6 - ('PACKAGE_NAME', '\"python-tn3270\"'), 14 + ('PACKAGE_NAME', '\"python3-tn3270\"'),
7 ('PACKAGE_VERSION', '\"5.2\"') 15 ('PACKAGE_VERSION', '\"5.2\"')
8 ], 16 ],
9 - include_dirs = ['src/include'], 17 + include_dirs = include_dirs,
10 libraries = ['ipc3270'], 18 libraries = ['ipc3270'],
  19 + library_dirs=library_dirs,
11 sources = [ 20 sources = [
12 'src/action/type.c', 21 'src/action/type.c',
13 'src/module/init.c', 22 'src/module/init.c',
@@ -35,7 +44,7 @@ setup ( name = 'tn3270', @@ -35,7 +44,7 @@ setup ( name = 'tn3270',
35 description = 'Python bindings for lib3270/pw3270.', 44 description = 'Python bindings for lib3270/pw3270.',
36 author = 'Perry Werneck', 45 author = 'Perry Werneck',
37 author_email = 'perry.werneck@gmail.com', 46 author_email = 'perry.werneck@gmail.com',
38 - url = 'https://github.com/PerryWerneck/python-tn3270', 47 + url = 'https://github.com/PerryWerneck/python3-tn3270',
39 long_description = ''' 48 long_description = '''
40 This is an extension allowing tn3270 acess for python applications 49 This is an extension allowing tn3270 acess for python applications
41 using lib3270 directly or ipc calls to an enabled pw3270 window. 50 using lib3270 directly or ipc calls to an enabled pw3270 window.