-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (37 loc) · 1.23 KB
/
setup.py
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
import os
from setuptools import setup, Extension
from distutils.command.build_ext import build_ext as build_ext_orig
class CTypesExtension(Extension): pass
class BuildExtension(build_ext_orig):
def build_extension(self, ext):
self._ctypes = isinstance(ext, CTypesExtension)
return super().build_extension(ext)
def get_export_symbols(self, ext):
if self._ctypes:
return ext.export_symbols
return super().get_export_symbols(ext)
def get_ext_filename(self, ext_name):
if self._ctypes:
return ext_name + '.so'
return super().get_ext_filename(ext_name)
setup(
name="pyzutil",
description="z/OS utilities for Python",
long_description = open("README.md", "r").read(),
long_description_content_type = 'text/markdown',
url="https://github.com/daveyc/pyzutil",
version="0.0.1-2",
license='MIT',
maintainer='David Crayford',
maintainer_email='[email protected]',
python_requires='>=3.9',
platforms=['any', 'none'],
py_modules=["pyzutil", "pyzutil.maps"],
ext_modules=[
CTypesExtension(
"pyzutil.libpyzutil",
["libpyzutil.cpp"],
)
],
cmdclass={'build_ext': BuildExtension},
)