Category : setuptools

I want to distribute a Python package which has a closed source dependency. I am using setup.py and everything works if I also do the compilation with setup.py. Neither answers to this question nor answers to that question solve my problem. I have the following file structure: . ├── closed_source │ ├── compiled.so ├── python_modules ..

Read more

For example, using -m for pdb and post-mortem debugging, you can do: python -m pdb script.py arg1 –kwarg (say for instance that arg1 and kwarg are parsed from sys.argv with the argparse module). A CLI tool can be created with pip/setuptools’ entry points: setup( … entry_points={ "console_scripts": [ "toolname = my_project.script:main" ] }, ) Now ..

Read more

My question is based on the following setup.py. I need to add a custom package as a wheel file to another wheel file. In a sense having it somehow in install_requires setup( name = ‘simple-package’, setup_requires = [‘setuptools >= 18.0’], packages = find_packages(exclude=[‘tests.*’, ‘tests’]), include_package_data = True, install_requires = [‘package_1’, ‘package_2’]) I have a custom ..

Read more

There are some parts of the nltk corpus that I’d like to add to the setup.py file. I followed the response here by setting up a custom cmdclass. My setup file looks like this. from setuptools import setup from setuptools.command.install import install as _install class DownloadNLTK(_install): def run(self): _install.do_egg_install(self) import nltk nltk.download(‘wordnet’) nltk.download(‘punkt’) nltk.download(‘stopwords’) nltk.download(‘vader_lexicon’) ..

Read more