I've adjusted the macOS instructions slightly to be more general,
e.g. do not advise symlinking a specific Python executable of a
specific version, just tell people they should make sure it's in
their environment.
And yes, on Windows, python.exe is whatever version you have installed,
so if you install Python 3, python.exe is going to be Python 3.
I've removed the FreeBSD instructions because they only talk about
working around ports potentially using Python 2.6, which is no longer
relevant. If somebody here uses FreeBSD and has anything to add to the
instructions not already covered by the Linux instructions, let me know.
Python 3.7 requires using the xenial images in Travis-CI. It appears
that they do not yet have newer distro version images available, so
that's the best we can get for now.
There's some stuff left to do, like properly do the functools.partial
stuff, and check that the uuidcache is actually working. But hey,
player markers work at least, and so does --skip-scan.
Still needs a port to argparse though.
Many things work, some don't. Notably, genPOI doesn't work, and
there's some signedness comparison stuff going on in the C extension.
This also completely drops support for Python 2, as maintaining a C
extension for both Python 2 and 3 is a pain and not worth it for the
9 months that Python 2 is still going to be supported upstream.
The documentation needs to be adjusted as well.
All of the few tests we have pass, and rendering a map works, both
with a configuration file and without. We can also use optimizeimages.
Concerns #1528.
In the process, we can clean up some of the command line argument
handling. Sadly, argparse's mutually exclusive groups are too
primitive to get rid of the autocrop/manual crop conflict checking,
but we'll have to live with those two lines I guess.
This script apparently also works with Python 3 now, which is neat.
dtt-c has been a thing for 8 years now, I think it's safe to say
people have deleted their old caches in the meantime.
findSigns has also been superseded by genPOI ever since genPOI
has been a thing, which has probably been since anvil.
One code style error can't really be fixed because despite
has_key being deprecated, "in" doesn't work on "super" for objects
that derive from dict, at least not in Python 2.7. Thanks Guido.
Also, I don't know which one of you it is that keeps putting semicolons
at the end of your statements but you seriously need to stop.
optparse is deprecated, and switching to argparse is mostly but not
entirely trivial. Nicely telling the user about shell quoting had
to be removed because I didn't see an easy way to do that with
argparse.
Apparently that comma had its reasons for being there because
Python2's print works in weird ways. We can do this better though
by using string concatenation.
A good sprinkling of PEP8 fixes. We're also getting rid of some
odd manual linebreaks in the output messages, and making sure to
end sentences with a period where appropriate. Help messages have
also been made more consistent, e.g. "Tries" -> "Try" and so forth.
Since Firefox 65 added support for WebP, users may be interested
in having maps that use WebP images. Support for this is added in
this commit, along with documentation for it.
A new option, "imglossless", controls whether we write out lossless
or lossy WebP images. The generic name "imglossless" as opposed to
a more specific "webplossless" was chosen in case future image
formats we also implement also support lossless/lossy modes in the
same format (JPEG-XL? AV1 image format?).
It's an okay meme but lossy mode really falls apart on our sorts
of images on the more zoomed out composite tiles, resulting in
pretty blurry messes. Might be due to a PSNR bias in the encoder,
which is to be expected from Google.
We've also added a setup.cfg to specify what rules we want for
pycodestyle. We'll be ignoring some dumb ones that make no sense
and probably shouldn't exist, like both W503 and W504 being an
issue somehow???????
We're using a line length limit of 100. If you're on an 80 character
terminal and incredibly upset about this, then that's the nursing
home staff's problem, not ours.