-
Notifications
You must be signed in to change notification settings - Fork 253
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-util is being executed as a python script #424
Comments
10 tasks
Hi all, |
This likely will break the reloading on other systems. |
That can be a Nixpkgs specific patch.
…On 28 November 2019 13:53:55 GMT+08:00, Rakesh Gupta ***@***.***> wrote:
Hi all,
This issue seems to be fixed we add the following change in
**mapproxy/util/ext/serving.py**.
replace **"args = [sys.executable] + sys.argv"** with
**"args = sys.argv"**
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#424 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Looks like this is done for Nixpkgs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, we are packaging mapproxy for NixOS: NixOS/nixpkgs#68628. And we have hit some problems.
The main problem is that Nix will wrap executables as shell scripts in order to create an isolated environment. Once we execute
mapproxy-util serve-develop mapproxy.yaml
we get a syntax error.I suspect that this is occurring because mapproxy thinkgs that
mapproxy-util
is a python script. And from Nix's perspective these are arbitrary executables. So they should just be executed like any other executable without needing to call it again frompython
.What we would do in Nixpkgs is to basically hotpatch the package so that it doesn't bother trying to call the script as a python script. This is similar to what we had to do for dvc: https://github.com/NixOS/nixpkgs/pull/54530/files#diff-551883c582fc9bc6f5388f662439af05
What I'd like to know is where your this patch is best applied? Where exactly in the program are you recalling
mapproxy-util
script like a Python script.The text was updated successfully, but these errors were encountered: