Moved code up one level post build folder creation
This commit is contained in:
28
src/utils/cbindings/python_package_works/setup.py
Normal file
28
src/utils/cbindings/python_package_works/setup.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Python imports
|
||||
from setuptools import setup, Extension
|
||||
from subprocess import check_output
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
|
||||
|
||||
|
||||
pkg_config_args = ["gdk-pixbuf-2.0", "cairo", "gtk+-3.0"]
|
||||
|
||||
def get_pkgconfig_flags(flag_type):
|
||||
return check_output(["pkg-config", flag_type] + pkg_config_args).decode().split()
|
||||
|
||||
ext = Extension(
|
||||
"gtkmemreaper",
|
||||
sources = ["gtkmemreaper.c"],
|
||||
include_dirs = [],
|
||||
extra_compile_args = get_pkgconfig_flags("--cflags"),
|
||||
extra_link_args = get_pkgconfig_flags("--libs")
|
||||
)
|
||||
|
||||
setup(
|
||||
name = "gtkmemreaper",
|
||||
version = "0.1",
|
||||
ext_modules = [ext]
|
||||
)
|
||||
Reference in New Issue
Block a user