Download setup.py from maleonly/test_repo: direct link, hf CLI and curl.
- Browser
- Download file 724 Bytes
-
https://huggingface.co/maleonly/test_repo/resolve/main/setup.py
- Command line
-
hf download hf://maleonly/test_repo/setup.py
-
curl -L -o setup.py https://huggingface.co/maleonly/test_repo/resolve/main/setup.py
724 Bytes
| import atexit | |
| from setuptools import setup, find_packages | |
| from setuptools.command.install import install | |
| def _post_install(): | |
| print('POST INSTALL') | |
| class NewInstall(install): | |
| def __init__(self, *args, **kwargs): | |
| super(NewInstall, self).__init__(*args, **kwargs) | |
| atexit.register(_post_install) | |
| def run(self): | |
| # Вызываем стандартный метод run | |
| install.run(self) | |
| # Здесь могут быть другие действия, если они необходимы | |
| setup( | |
| name='test_repo', | |
| version='0.8', | |
| packages=find_packages(), | |
| cmdclass={ | |
| 'install': NewInstall, | |
| }, | |
| # ... другие параметры setup ... | |
| ) |