|
6 | 6 | from setuptools import Extension, find_packages, setup |
7 | 7 | from setuptools.command.build_ext import build_ext |
8 | 8 |
|
9 | | -# Convert distutils Windows platform specifiers to CMake -A arguments |
10 | | -PLAT_TO_CMAKE = { |
11 | | - "win32": "Win32", |
12 | | - "win-amd64": "x64", |
13 | | - "win-arm32": "ARM", |
14 | | - "win-arm64": "ARM64", |
15 | | -} |
16 | | - |
17 | 9 |
|
18 | 10 | # A CMakeExtension needs a sourcedir instead of a file list. |
19 | 11 | # The name must be the _single_ output extension from the CMake build. |
@@ -45,8 +37,8 @@ def build_extension(self, ext: CMakeExtension) -> None: |
45 | 37 | # from Python. |
46 | 38 | cmake_args = [ |
47 | 39 | f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}", |
48 | | - f"-DPYTHON_EXECUTABLE={sys.executable}", |
49 | 40 | f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm |
| 41 | + f"-DPython_EXECUTABLE={sys.executable}", |
50 | 42 | ] |
51 | 43 | build_args = [] |
52 | 44 |
|
@@ -122,44 +114,7 @@ def build_extension(self, ext: CMakeExtension) -> None: |
122 | 114 | long_description = readme_path.read_text(encoding="utf-8") |
123 | 115 |
|
124 | 116 | setup( |
125 | | - name="pylibbpf", |
126 | | - version="0.0.1", |
127 | | - author="varun-r-mallya, r41k0u", |
128 | | - author_email="varunrmallyagmail.com", |
129 | | - description="Python Bindings for Libbpf", |
130 | | - long_description=long_description, |
131 | | - long_description_content_type="text/markdown", |
132 | | - url="https://github.com/pythonbpf/pylibbpf", |
133 | | - packages=find_packages(where="."), |
134 | | - package_dir={"": "."}, |
135 | | - py_modules=[], # Empty since we use packages |
136 | 117 | ext_modules=[CMakeExtension("pylibbpf.pylibbpf")], |
137 | 118 | cmdclass={"build_ext": CMakeBuild}, |
138 | 119 | zip_safe=False, |
139 | | - classifiers=[ |
140 | | - "Development Status :: 3 - Alpha", |
141 | | - "Intended Audience :: Developers", |
142 | | - "Operating System :: POSIX :: Linux", |
143 | | - "Programming Language :: Python :: 3", |
144 | | - "Programming Language :: Python :: 3.8", |
145 | | - "Programming Language :: Python :: 3.9", |
146 | | - "Programming Language :: Python :: 3.10", |
147 | | - "Programming Language :: Python :: 3.11", |
148 | | - "Programming Language :: Python :: 3.12", |
149 | | - "Programming Language :: C++", |
150 | | - "Topic :: Software Development :: Libraries :: Python Modules", |
151 | | - "Topic :: System :: Operating System Kernels :: Linux", |
152 | | - ], |
153 | | - install_requires=[ |
154 | | - "llvmlite>=0.40.0", # Required for struct conversion |
155 | | - ], |
156 | | - extras_require={"test": ["pytest>=6.0"]}, |
157 | | - python_requires=">=3.8", |
158 | | - package_data={ |
159 | | - "pylibbpf": [ |
160 | | - "*.py", |
161 | | - "py.typed", # For type hints |
162 | | - ], |
163 | | - }, |
164 | | - include_package_data=True, |
165 | 120 | ) |
0 commit comments