New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codechange: Rewrite setup.py #51
Conversation
May not be for this PR to change but, |
AFAIK, this is because nml has long been < 1.0 The rationale is that it hasn't been completed to the extent of the original goals, notably:
The tool has been shipping largely unmodified for about 5 years, so the version number scheme might not match the facts on the ground . Or it might all be fine? Dunno :) |
Support for 3.8 can be indicated I think |
4c8dc15
to
c2e6226
Compare
Works for me on mac also. |
Just tried installing this on my Windows 10 with Python 3.8, with |
cx_Freeze is indeed a pip package. Previously it was optional, now it is required (to make a standalone nml.exe). I suspect the installation of cx_Freeze but just in case, what was the error message when you tried to install it? It does occur to me that if you do have a functioning Python install on Windows, you might not want to generate a standalone exe in the same way. Needs some thought. |
cx_freeze really only is needed for generating a binary - not needed when you have actual python. As such it should not be a requirement, but a maintainer thing. Or is it difficult on windoze to run a script, provided you have python? |
I found the reason why my cx_Freeze wouldn't install with pip. It's not yet compatible with Python 3.8 it seems. I just tried installing it on Python 3.7.5 and it worked without any issues. So I built cx_Freeze on Python 3.8 from [https://github.com/anthony-tuininga/cx_Freeze](the repo) and it worked well. However, nml install still fails at
|
There is also some background info on the related issue for this PR: #42. Particularly respecting 'do we even need cx_Freeze', milek reported in irc a successful nml install in Python on Windows, without binary. I'm not sure if our target Windows audience will be able to do that though. Without a Windows binary I'd be concerned about reduction in newgrf authoring. Respecting python 3.8 I don't have it installed, so haven't tested, but I could get it. One more python can't hurt, I have 11 versions already 👻 |
I totally agree, we should by all means possible ship a ready-built binary. I think this issue is about whether the tools required to build it should be a requirement from setup.py (which only is executed when you have python, thus don't need a binary) |
Applicable competing rules of thumb
|
pyinstaller seems to work quite well to provide a self containing exe |
Various changes, mostly related to packaging. Now always uses cx_freeze to build executables on Windows, and standard packaging otherwise
Call with
setup.py bdist
to build the package