Skip to content

Commit 6bc378d

Browse files
committed
Remove unnecessary metadata, fix CMake flag in setup.py
1 parent 5c1071f commit 6bc378d

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

setup.py

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66
from setuptools import Extension, find_packages, setup
77
from setuptools.command.build_ext import build_ext
88

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-
179

1810
# A CMakeExtension needs a sourcedir instead of a file list.
1911
# The name must be the _single_ output extension from the CMake build.
@@ -45,8 +37,8 @@ def build_extension(self, ext: CMakeExtension) -> None:
4537
# from Python.
4638
cmake_args = [
4739
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
48-
f"-DPYTHON_EXECUTABLE={sys.executable}",
4940
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
41+
f"-DPython_EXECUTABLE={sys.executable}",
5042
]
5143
build_args = []
5244

@@ -122,44 +114,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
122114
long_description = readme_path.read_text(encoding="utf-8")
123115

124116
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
136117
ext_modules=[CMakeExtension("pylibbpf.pylibbpf")],
137118
cmdclass={"build_ext": CMakeBuild},
138119
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,
165120
)

0 commit comments

Comments
 (0)