Skip to content
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

[FEAT] install: Download Osmosis and Osmfilter on Windows during first run instead of shipping with the tool #167

Merged
merged 13 commits into from
Nov 29, 2022

Conversation

treee111
Copy link
Owner

@treee111 treee111 commented Nov 5, 2022

This PR…

  • downloads OSM-tools (Osmosis, Osmfilter) on Windows if it is not already there
  • brings down to-be-published size of wahooMapsCreator down from 29MB to 1,5MB

Considerations and implementations

Reasons for not shipping Osmosis via PyPI:

  • only relevant for Windows
  • hugh part of the published tool in percentage
  • only needed "once", does not change per new version (actually)

Reason for not shipping Osmconvert:

  • the "official" is not producting output on Windows and might not be working with very big files - see Limitations
  • hence I continue using osmconvert64-0.8.8p.exe and the non 64bit version from within the python module

without Osmosis and Osmfilter: wahoomc-3.2.0a3 / branch dl-tooling-win:
grafik

with Osmosis and Osmfilter: wahoomc-3.2.0a4 / branch develop:
grafik

How to test

  1. install version wahoomc-3.2.0a3 or checkout this branch
  2. check this folder in your user directory wahooMapsCreatorData/_download for a tooling_win folder
  • in both OS, this folder should be not there
  1. run python -m wahoomc cli -co malta or python -m wahoomc -h
  2. check this folder in your user directory wahooMapsCreatorData/_download for a tooling_win folder
  • in Windows there should be a Osmosis directory and a osmfilter.exe file
    grafik

  • in macOS this folder should be not there

Pull Request Checklist

@treee111 treee111 added the infrastructure Infrastructure label Nov 5, 2022
@treee111 treee111 force-pushed the dl-tooling-win branch 3 times, most recently from 53fc60c to 7c374ad Compare November 8, 2022 21:46
@treee111 treee111 changed the title [FEAT] Download Osmosis for Windows on first run instead of shipping with the tool [FEAT] Download Osmosis, Osmconvert, Osmfilter for Windows on first run instead of shipping with the tool Nov 8, 2022
@treee111 treee111 added this to the v4.0.0 milestone Nov 12, 2022
@treee111 treee111 force-pushed the develop branch 2 times, most recently from b6266a1 to 9075b43 Compare November 12, 2022 20:25
- needed for windows tooling
- single point of truth
- incl rework unzip function to not have lib/lib doubled directories after unzipping
- incl reformatting download_file() calls
- calculate if download is a .zip file
- input absolute target_dir to be more flexible
- change calls accordingly
+ one function for PyPI module access and user dir
@treee111 treee111 changed the title [FEAT] Download Osmosis, Osmconvert, Osmfilter for Windows on first run instead of shipping with the tool [FEAT] Download Osmosis and Osmfilter for Windows on first run instead of shipping with the tool Nov 29, 2022
@treee111 treee111 removed this from the v4.0.0 milestone Nov 29, 2022
@treee111 treee111 added this to the v3.2.0 milestone Nov 29, 2022
- make variables clearer
@treee111 treee111 marked this pull request as ready for review November 29, 2022 11:45
@treee111 treee111 changed the title [FEAT] Download Osmosis and Osmfilter for Windows on first run instead of shipping with the tool [FEAT] install: Download Osmosis and Osmfilter on Windows during first run instead of shipping with the tool Nov 29, 2022
@treee111 treee111 merged commit ae4eb1f into develop Nov 29, 2022
@treee111 treee111 deleted the dl-tooling-win branch November 29, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant