I’m creating a setup.py with easyinstall and I need to execute a certain py file in the same project before the build is done. I tried setup_requires and ext_modules, but both seem not to be able to call a python file in the same project.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following code creates a new build command that calls your own custom function before delegating to the original build command. In the following,
RunYourOtherScript()stands for whatever you want to run before thebuildtakes place. This could be a call toexecfile('src/something.py')or preferably a relative import and a function call.