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

mapproxy: Added additional dependency boto3, needed for s3 cache support #80410

Merged
merged 1 commit into from Feb 18, 2020

Conversation

Rakesh4G
Copy link
Contributor

@Rakesh4G Rakesh4G commented Feb 18, 2020

Motivation for this change

Added additional dependency boto3, needed for s3 cache support

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
    @CMCDragonkai

@jonringer
Copy link
Contributor

I don't agree with this. the mapproxy package doesn't require this https://github.com/mapproxy/mapproxy/blob/master/setup.py

I would just add it to this to your development environment

@Rakesh4G
Copy link
Contributor Author

Hi @jonringer ,

As per https://mapproxy.org/docs/nightly/caches.html#s3

s3

New in version 1.10.0.

New in version 1.11.0: region_name, endpoint_url and access_control_list

Store tiles in a Amazon Simple Storage Service (S3) or any other S3 compatible object storage.

Requirements

You will need the Python boto3 package. You can install it in the usual way, for example with pip install boto3.

Also : import of boto3 is required inside mapproxy, when trying to use s3.
https://github.com/mapproxy/mapproxy/blob/master/mapproxy/cache/s3.py#L29

Please suggest.
Thanks.

@jonringer
Copy link
Contributor

it's still an optional dependency, they have try..catch logic around their import to ensure it doesn't break at runtime, and will only error if you try to then use the caches service.....

That being said, I just realized this is an application and not a python-module. I guess it would be hard to inject as you would have to override the derivation.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

https://github.com/NixOS/nixpkgs/pull/80410
1 package built:
mapproxy

pkgs/applications/misc/mapproxy/default.nix Outdated Show resolved Hide resolved
@jonringer
Copy link
Contributor

@GrahamcOfBorg build mapproxy

@jonringer jonringer merged commit 50593c6 into NixOS:master Feb 18, 2020
@Rakesh4G Rakesh4G deleted the mapproxy-s3-support branch February 18, 2020 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants