Closed igorburago closed 4 years ago
Actually, do we need the regex
module to be present during setup,
if we have it as an install dependency?
Perhaps I am missing something, but I cannot see any reason why
it is necessary to have regex
in setup_requires
, if we have it in
install_requires
.
Prior to the version fix, because it was imported in setup, it was needed in setup. I'm guessing way back in the day, setup ran before install and so things used to work.
I'll update this to move to install.
Sounds good.
If the
regex
package is not installed on the user’s system, the currentsetup.py
file does not install it automatically, causing theModuleNotFoundError
exception in any module importingtitlecase
:This is due to
regex
being listed in thesetup_requires
argument in thesetup
call only, and not being listed in theinstall_requires
one.The issue can be resolved by adding the following argument to the
setup()
call:We should be aware that this exposes a known issue with setuptools when the same package is listed both in
setup_requires
andinstall_requires
. However, this only applies to the cases when thesetup.py
is invoked manually.It is my understanding that when the package is installed via
pip install
, everything works correctly. Given that, I think, the tradeoff in addingregex
toinstall_requires
is well justified (especially given that the setuptools issue will hopefully be addressed in the future—if not already).