30 lines
715 B
Python
30 lines
715 B
Python
import setuptools
|
|
import os
|
|
import subprocess
|
|
|
|
class CustomBuild(setuptools.Command):
|
|
description = "Compile the C extension"
|
|
user_options = []
|
|
|
|
def initialize_options(self):
|
|
pass
|
|
|
|
def finalize_options(self):
|
|
pass
|
|
|
|
def run(self):
|
|
cwd = os.path.abspath(os.path.dirname(__file__))
|
|
subprocess.check_call(["bash", os.path.join(cwd, "magic", "compile.sh")])
|
|
|
|
setuptools.setup(
|
|
name="magic_cache",
|
|
version="0.1.0",
|
|
description="A magic caching library for Python",
|
|
author="Your Name",
|
|
author_email="your.email@example.com",
|
|
packages=setuptools.find_packages(where="."),
|
|
cmdclass={"build_ext": CustomBuild},
|
|
include_package_data=True,
|
|
)
|
|
|