BUG: Some sub-dependencies are not automatically installed when installing PyFunceble in Cygwin
Description
After I had to do a fresh Windows 11 install earlier this week, I also re-installed Cygwin64 and PyFunceble, and noticed that greenlet and ruamel.yaml.clib were not listed as dependencies on https://pyfunceble.readthedocs.io/en/dev/installation/index.html#requirements despite making the PyFunceble installation fail if they were not installed.
This turned out to be fixed by installing the gcc-core, gcc-g++ and python39-devel Cygwin modules, and although I am unsure how feasible (or even possible) it'd be to add packages that exist in Cygwin modules to https://github.com/funilrys/PyFunceble/blob/dev/requirements.win.txt, I figured it'd be worthwhile for me to write this anyway before I completely forgot about it.
Full list of dependencies used by the PyFunceble installation as of 23rd of October 2022, which are somewhat more than what were listed on the Requirements page:
PyFunceble (4.1.2)
colorama (from PyFunceble) (0.4.5)
packaging (from PyFunceble) (21.3)
PyYAML (from PyFunceble) (6.0)
cryptography>=3.3.2 in /usr/lib/python3.9/site-packages (from PyFunceble) (3.3.2)
dnspython[doh]>=2.0.0 (from PyFunceble) (2.2.1)
setuptools in /usr/lib/python3.9/site-packages (from PyFunceble) (59.5.0)
requests[socks]<3 (from PyFunceble) (2.28.1)
alembic (from PyFunceble) (1.8.1)
domain2idna>=1.12.0 (from PyFunceble) (1.12.0)
python-dotenv (from PyFunceble) (0.21.0)
python-box[all]<6 (from PyFunceble) (5.4.1)
inflection (from PyFunceble) (0.5.1)
shtab (from PyFunceble) (1.5.5)
SQLAlchemy>=1.3.20 (from PyFunceble) (1.4.42)
PyMySQL (from PyFunceble) (1.0.2)
cffi>=1.12 in /usr/lib/python3.9/site-packages (from cryptography>=3.3.2->PyFunceble) (1.15.0)
six>=1.4.1 in /usr/lib/python3.9/site-packages (from cryptography>=3.3.2->PyFunceble) (1.16.0)
requests-toolbelt<0.10.0,>=0.9.1 (from dnspython[doh]>=2.0.0->PyFunceble) (0.9.1)
h2>=4.1.0 (from dnspython[doh]>=2.0.0->PyFunceble) (4.1.0)
httpx>=0.21.1 (from dnspython[doh]>=2.0.0->PyFunceble) (0.23.0)
ruamel.yaml (from python-box[all]<6->PyFunceble) (0.17.21)
msgpack (from python-box[all]<6->PyFunceble) (1.0.4)
toml (from python-box[all]<6->PyFunceble) (0.10.2)
idna<4,>=2.5 in /usr/lib/python3.9/site-packages (from requests[socks]<3->PyFunceble) (3.3)
certifi>=2017.4.17 (from requests[socks]<3->PyFunceble) (2022.9.24)
urllib3<1.27,>=1.21.1 (from requests[socks]<3->PyFunceble) (1.26.12)
charset-normalizer<3,>=2 (from requests[socks]<3->PyFunceble) (2.1.1)
PySocks!=1.5.7,>=1.5.6 (from requests[socks]<3->PyFunceble) (1.7.1)
greenlet!=0.4.17 in /usr/local/lib/python3.9/site-packages (from SQLAlchemy>=1.3.20->PyFunceble) (1.1.3.post0)
Mako (from alembic->PyFunceble) (1.2.3)
pyparsing!=3.0.5,>=2.0.2 (from packaging->PyFunceble) (3.0.9)
pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.3.2->PyFunceble) (2.20)
hpack<5,>=4.0 (from h2>=4.1.0->dnspython[doh]>=2.0.0->PyFunceble) (4.0.0)
hyperframe<7,>=6.0 (from h2>=4.1.0->dnspython[doh]>=2.0.0->PyFunceble) (6.0.1)
sniffio (from httpx>=0.21.1->dnspython[doh]>=2.0.0->PyFunceble) (1.3.0)
rfc3986[idna2008]<2,>=1.3 (from httpx>=0.21.1->dnspython[doh]>=2.0.0->PyFunceble) (1.5.0)
httpcore<0.16.0,>=0.15.0 (from httpx>=0.21.1->dnspython[doh]>=2.0.0->PyFunceble) (0.15.0)
MarkupSafe>=0.9.2 (from Mako->alembic->PyFunceble) (2.1.1)
ruamel.yaml.clib>=0.2.6 (from ruamel.yaml->python-box[all]<6->PyFunceble) (0.2.7)
h11<0.13,>=0.11 (from httpcore<0.16.0,>=0.15.0->httpx>=0.21.1->dnspython[doh]>=2.0.0->PyFunceble) (0.12.0)
anyio==3.* (from httpcore<0.16.0,>=0.15.0->httpx>=0.21.1->dnspython[doh]>=2.0.0->PyFunceble) (3.6.2)
Configuration
The default .PyFunceble.yaml file was used.
Reproduction
- Use a fresh Windows 11 22H2 install.
- Install Cygwin64, along with its
python39andpython39-pipmodules. - Run
pip3 install --user PyFunceble(Usingpipinstead ofpip3could cause Cygwin to try to use the PowerShell Python installation instead, if such an installation exists.) - Receive a large error in red text when it tries to install
greenlet, which causes the installation process to end.
Expected behavior
Running pip3 install --user PyFunceble would succeed on the first try and would install all needed dependencies.
Screenshots
As I'm unsure how to un-fix the fix I used for greenlet, it'd take considerable effort to get a screenshot of the error message.
Versions
OS: Windows 11 22H2 x64
Python Version: 3.9.10-1
PyFunceble Version: 4.1.2
Additional context
Not particularly related, yet still odd, was that Cygwin64 apparently doesn't add a /etc/resolv.conf file by default when being installed nowadays, which caused PyFunceble to fail to work after being installed. Adding a simple text file there with nameserver 192.168.1.1 (or whichever router-gateway the PC has) fixed it.
It also turned out I had to add C:\cygwin64\home\[System username]\.local\bin to PATH as well, but that part is admittedly well outside of PyFunceble's responsibility area.
That's interesting. ruamel.yaml used to be part of python-box[all]. I'll look at this ASAP ...
@DandelionSprout Windows 11 provides WSL ... Can you test if PyFunceble is working with it ?
Thank you for the feedback!
It could take me some days to test WSL due to chef exam commitments; I think I'll have time on Thursday or Friday.
@DandelionSprout no worries. Take your time. Rome wasn't built in 1 day.
Can you also test (in a clean environment) if the issue happens with the maintenance branch? Thank you!
pip3 install --user git+ssh://[email protected]/funilrys/PyFuncebel.git@maintenance#egg=PyFunceble-dev
Having got around to test in WSL (I got a passing score on the chef exam), it seems there's some crossbleed between WSL and Cygwin64 that makes the former able to access the latter's packages and package names (incl. python3 and pip3), making it prohibitively difficult to truly test PyFunceble in WSL, unfortunately.
I'll hopefully take less time before I'd next up test pip3 install --user git+ssh://[email protected]/funilrys/PyFuncebel.git@maintenance#egg=PyFunceble-dev