Closed Syriiin closed 5 years ago
this kind of a chicken and egg problem, it requires the oppai dll to be already built to be able to build the pip package. if you build it again it should get the correct version. it's kind of a messy workaround to not have to update the version in multiple places. the linux binaries i uploaded to pip for example should show the correct version
but it doesn't happen on linux. is there a different build order or something?
on linux you aren't compiling it on the spot because I already uploaded binaries to pip which I built using that bootstrapping step of building it twice (here's the script that does it, it does build_ext first as you can see https://github.com/Francesco149/oppai-ng/blob/master/swig/python/build_wheels.sh). I didnt bother making windows binaries though
ah, makes sense. almost feel like it would be worth to do some messy regex to pull the version numbers out of the oppai.c source since even though its still not a good solution, it atleast works on anywhere the setup.py will run and don't need to worry about the extra step for the linux binaries
yeah i was thinking of that too, will prob do that
i set up appveyor to automatically build and upload windows wheels, so future releases will not even require msvc on windows
oh neato
As title suggests, when installing the python bindings on windows via
pip
, thesetup.py
will fail tofrom oppai import oppai_version_str
and hit the fallback "INVALID" version string.Appears to only affect the package name and pip version data (package name is "oppai-INVALID" and
pip freeze
displaysoppai===INVALID
). The actual package works as intended with the internal version displaying the correct "3.2.0". This will be a problem though if people usepip freeze > requirements.txt
to generate their requirements file as it will cause pip to throw an error when installing from it (unless they manually edit out the version string).As a side note for anyone running into errors relating to C++ build tools or missing .h files when attempting the pip install, make sure you have the latest C++ build tools installed from https://visualstudio.microsoft.com/downloads. For some odd reason my win7 pc required me to install the latest VS2019 C++ build tools, but my win10 pc required the VS2017 C++ build tools.