0

I have the following structure of packages:

repo  
|__pckg1
    |__settings.txt
    |__create_new_file.py
    |__setup.py
    |__requirements1.txt
|__pckg2
    |__requirements2.txt

Requirements2.txt has: file:../pckg1

create_new_file.py creates new file based on settings.txt It should run before setup.py so the newly created file will be part of the installation. Is it possible to achieve this?

I tried all the options from here but nothing worked

ljmc
  • 4,830
  • 2
  • 7
  • 26
Galia
  • 1
  • 2
  • There is `PostInstallCommand` in an answer of the linked question. You can make it `PreInstallCommand` and call you code before calling `install.run(self)`. The warning remains though: "*Note: The solution below only works when installing a **source distribution** zip or tarball, or installing in editable mode from a source tree. **It will not work when installing from a binary wheel (.whl)***" — emphasize mine. – phd Jan 02 '23 at 14:33
  • Thank you @phd, there is another issue with this approach - in order to run 'create_new_file.py' needs it's dependencies to be installed.. – Galia Jan 03 '23 at 07:18

0 Answers0