Skip to content Skip to sidebar Skip to footer

Create A Python Script That Install Python Modules And Run Some Commands

I want to create a thin wrapper around this library https://github.com/jupyter-incubator/sparkmagic#installation As you can see in the link, the installation step requires instal

Solution 1:

The issue is not with pip install directly but with wheels. Projects packaged as wheel can not have custom install steps. See for example this discussion. Since pip prefers working with wheels, building them locally if necessary, your custom steps are not run at install time. There are probably ways to prevent the wheel step though.

Knowing this, you probably should follow the advice from Jan Vlcinsky in his comment for his answer to this question: Post install script after installing a wheel.

  • Add a setuptoolsconsole entry point to your project (let's call it myprojectconfigure). Maybe you prefer using the distutilsscript feature instead.

  • Instruct the users of your package to run it immediately after installing your package (pip install myproject && myprojectconfigure).

  • Eventually think about providing myprojectconfigure --uninstall as well.

Post a Comment for "Create A Python Script That Install Python Modules And Run Some Commands"