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

bepasty: make it a package again #38300

Merged
merged 1 commit into from Apr 11, 2018
Merged

Conversation

Lassulus
Copy link
Member

@Lassulus Lassulus commented Apr 1, 2018

this fixes running bepasty with gunicorn, which is needed for
services.bepasty

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

writing entry points to bepasty.egg-info/entry_points.txt
reading manifest file 'bepasty.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
writing manifest file 'bepasty.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: bepasty

Partial log (click to expand)

make[3]: Entering directory '/private/tmp/nix-build-rustc-1.24.0.drv-0/rustc-1.24.0-src/build/x86_64-apple-darwin/llvm/build'
[ 32%] Building CXX object lib/Transforms/Coroutines/CMakeFiles/LLVMCoroutines.dir/Coroutines.cpp.o
[ 32%] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LoopLoadElimination.cpp.o
[ 32%] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/InferFunctionAttrs.cpp.o
building of '/nix/store/xf4jw7a54gn7dxry8qqgb8vp0llqc8pv-rustc-1.24.0.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/3ga07ndrczi8v8chj01hp74n8jfavs83-cargo-0.24.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9413l1rvnrnvwa2nzpm0zhbd94pcyk8f-geckodriver-unstable-2018-02-24.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/nmw4wj9rz1wna5v080h6aq9lcq65yby2-python2.7-selenium-3.6.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2djriqzrwr3j9r9bqs0h3kz3n7a1v5xs-python2.7-bepasty-0.4.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/2djriqzrwr3j9r9bqs0h3kz3n7a1v5xs-python2.7-bepasty-0.4.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

   Compiling backtrace v0.3.4
   Compiling proc_macro v0.0.0 (file:///build/rustc-1.24.0-src/src/libproc_macro)
   Compiling rustc_const_math v0.0.0 (file:///build/rustc-1.24.0-src/src/librustc_const_math)
   Compiling syntax_ext v0.0.0 (file:///build/rustc-1.24.0-src/src/libsyntax_ext)
building of '/nix/store/whsyh46wr0zfkw420xcc8ffgahszsd80-rustc-1.24.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/nfjkyviyyy9ly6hq1pj5wzy6qxmd491n-cargo-0.24.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/gcfp76fva6nhz86042ivcnq23dza7cgi-geckodriver-unstable-2018-02-24.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/dpxr3s8mscknnmagwbc3dr4vdpa48d0m-python2.7-selenium-3.6.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/99m2kmgjpqi93k3fscmvmsq18m0mfzqi-python2.7-bepasty-0.4.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/99m2kmgjpqi93k3fscmvmsq18m0mfzqi-python2.7-bepasty-0.4.0.drv' failed

@dotlambda
Copy link
Member

I'm not really sure what the best option is in this case. /cc @FRidh

The relevant lines from the systemd service:

        systemd.services."bepasty-server-${name}-gunicorn" = {
          environment = let
            penv = python.buildEnv.override {
              extraLibs = [ bepasty gevent ];
            };
          in {
            BEPASTY_CONFIG = "${server.workDir}/bepasty-${name}.conf";
            PYTHONPATH= "${penv}/${python.sitePackages}/";
          };
          ExecStart = ''${gunicorn}/bin/gunicorn bepasty.wsgi --name ${name} ..."
        };

@FRidh
Copy link
Member

FRidh commented Apr 8, 2018

This is an interesting issue. Bepasty is a server, so considered an application. The service works by creating and setting the PYTHONPATH environment variable, pointing to a a Python env. buildEnv will only include libraries and not applications.

I think the solution here is indeed to revert back to buildPythonPackage.

@Lassulus can you include a comment stating that buildPythonPackage needs to be used with a reference to this PR?

@FRidh FRidh added 6.topic: python 0.kind: regression Something that worked before working no longer labels Apr 8, 2018
@FRidh
Copy link
Member

FRidh commented Apr 8, 2018

python.buildEnv will only include libraries as of 40851a4.

@Lassulus
Copy link
Member Author

Lassulus commented Apr 9, 2018

@FRidh like this? I'm not sure I got what you mean

@dotlambda
Copy link
Member

I think an inline comment (in the code, not the commit message) would be better. And please add a link to this PR.

this fixes running bepasty with gunicorn, which is needed for
services.bepasty
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
writing manifest file 'bepasty.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/dc3kpwjzriqvqdifplw3gn069g0wg3mr-python2.7-bepasty-0.4.0

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: bepasty

Partial log (click to expand)

   Compiling rustc_privacy v0.0.0 (file:///private/tmp/nix-build-rustc-1.25.0.drv-0/rustc-1.25.0-src/src/librustc_privacy)
   Compiling rustc_save_analysis v0.0.0 (file:///private/tmp/nix-build-rustc-1.25.0.drv-0/rustc-1.25.0-src/src/librustc_save_analysis)
   Compiling rustc_borrowck v0.0.0 (file:///private/tmp/nix-build-rustc-1.25.0.drv-0/rustc-1.25.0-src/src/librustc_borrowck)
   Compiling rustc_trans_utils v0.0.0 (file:///private/tmp/nix-build-rustc-1.25.0.drv-0/rustc-1.25.0-src/src/librustc_trans_utils)
building of '/nix/store/nvxlbn91xd5aixfkqkkd6baiy19pr6gs-rustc-1.25.0.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/nxr2zz5skkdww5bcgljkb1m6y7bi75lm-cargo-0.26.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/bfcawq8gx831ylnafd8n96ayxmi5ajsq-geckodriver-unstable-2018-02-24.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/annfc2hnmzcbddmqj865f1hc1kb8fc28-python2.7-selenium-3.6.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/x2g2xx2sfa3im9ixh8mkjhw757h4z26h-python2.7-bepasty-0.4.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/x2g2xx2sfa3im9ixh8mkjhw757h4z26h-python2.7-bepasty-0.4.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

test [compile-fail] compile-fail-fulldeps/gated-quote.rs ... ok
test [compile-fail] compile-fail-fulldeps/gated-macro-reexports.rs ... ok
test [compile-fail] compile-fail-fulldeps/issue-18986.rs ... ok
test [compile-fail] compile-fail-fulldeps/explore-issue-38412.rs ... ok
building of '/nix/store/36rq4v2m89p1r1i8vv4lh9ay89pangil-rustc-1.25.0.drv' timed out after 4000 seconds
cannot build derivation '/nix/store/hrbjq2kvdyzpf96q608wiqfcf0hw7vdc-cargo-0.26.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/qr7kxbwwad58zh5dhfv9mkzqp0qjffas-geckodriver-unstable-2018-02-24.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/xrcl7p58v9h34xi3ccs501yw4a6cvzc9-python2.7-selenium-3.6.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/f12qb0qgba5iaqr98sb4sm11yz72578x-python2.7-bepasty-0.4.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/f12qb0qgba5iaqr98sb4sm11yz72578x-python2.7-bepasty-0.4.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file src/libstd/sys_common/thread_info.rs.rej
builder for '/nix/store/7ns5z1p4gnzv6s2x056b8a6bh33g42ns-rustc-1.25.0.drv' failed with exit code 1
cannot build derivation '/nix/store/vsx7yh0j55abc3hf0fr0n328447kgq70-cargo-0.26.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vrb1n4b3nyl4z7gk5mq8hcg1vnmbzymw-geckodriver-unstable-2018-02-24.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/4lb1gypmnk9cmb0mx8fq2jxwsvkyc293-python2.7-selenium-3.6.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9s7xfli54fwm6rmbkh91wlj4vi22kh9h-python2.7-bepasty-0.4.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/9s7xfli54fwm6rmbkh91wlj4vi22kh9h-python2.7-bepasty-0.4.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file src/libstd/sys_common/thread_info.rs.rej
builder for ‘/nix/store/y2qfvhnrq8ypnha05qsdg9xdghw9xhgr-rustc-1.25.0.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/g6dbhzp33465pwl5403m86qyiwkrcksd-cargo-0.26.0.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/qvv4nakvn7zsj1faz33807c1dfj14rb5-geckodriver-unstable-2018-02-24.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/c2wjnaq3sszkk5ssqny54f4yxikcx0r8-python2.7-selenium-3.6.0.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/jh1gc9xbkhy0p315zbzyswahnr79kh1j-python2.7-bepasty-0.4.0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/jh1gc9xbkhy0p315zbzyswahnr79kh1j-python2.7-bepasty-0.4.0.drv’ failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: bepasty

Partial log (click to expand)

cannot build derivation '/nix/store/nzqckphzq2czj7x1d1w4z4ibmxmj9gbp-python2.7-cryptography-2.2.2.drv': 21 dependencies couldn't be built
cannot build derivation '/nix/store/gap30p9qbhic6lhyb1nscns7bb1qyg3v-geckodriver-unstable-2018-02-24.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/kqw320qf86brzz2pbzdk786byq83m40i-python2.7-pyOpenSSL-17.5.0.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/p8bx957fxqzyz6ciabd2xxnpl979kwdv-python2.7-selenium-3.6.0.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/zvf8rblpvvdgyyl8js900kgavf13ihvb-python2.7-urllib3-1.22.drv': 12 dependencies couldn't be built
cannot build derivation '/nix/store/mcsk10286pcwz249zsd2jwy7amvd2w36-python2.7-requests-2.18.4.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/ll4w9salcx65c7hlyi1n1c8b8rgg85jf-python2.7-Werkzeug-0.14.1.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/p1xq2am0f93wvwr2lkw19l6l78d81k5f-python2.7-Flask-0.12.2.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/wql0pzj11g7ks4h0jgriwy23k41csvdm-python2.7-bepasty-0.4.0.drv': 17 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/wql0pzj11g7ks4h0jgriwy23k41csvdm-python2.7-bepasty-0.4.0.drv' failed

@dotlambda
Copy link
Member

@GrahamcOfBorg build bepasty

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

   Compiling backtrace v0.3.5
   Compiling proc_macro v0.0.0 (file:///build/rustc-1.25.0-src/src/libproc_macro)
   Compiling rustc_const_math v0.0.0 (file:///build/rustc-1.25.0-src/src/librustc_const_math)
   Compiling syntax_ext v0.0.0 (file:///build/rustc-1.25.0-src/src/libsyntax_ext)
building of '/nix/store/0p4h4m63ki245n14vpk2xihn23lq1a4a-rustc-1.25.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/apcj2slll2axzpsnpyw7qxq0mymqdhly-cargo-0.26.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1frdm3sp5axcs2jvp4sq401r2jn02pcb-geckodriver-unstable-2018-02-24.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/plax67aadgskxwwwpz3insljlgs9siwl-python2.7-selenium-3.6.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/6wxgshd9a0z52w8imgqpsv18sm3krqdy-python2.7-bepasty-0.4.0.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/6wxgshd9a0z52w8imgqpsv18sm3krqdy-python2.7-bepasty-0.4.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: bepasty

Partial log (click to expand)

reading manifest file 'bepasty.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
writing manifest file 'bepasty.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
/nix/store/zb28wj756wbhzbzgk42yibcqdxi291ga-python2.7-bepasty-0.4.0

@dotlambda dotlambda merged commit 4889d79 into NixOS:master Apr 11, 2018
@dotlambda
Copy link
Member

Should this be backported to 18.03?

@Lassulus
Copy link
Member Author

@dotlambda yes, please

@dotlambda
Copy link
Member

Backported in 1092f6d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants