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

pythonPackages.pyosmium: init at 2.15.3 #79241

Merged
merged 1 commit into from Feb 6, 2020
Merged

Conversation

sikmir
Copy link
Member

@sikmir sikmir commented Feb 4, 2020

Motivation for this change

PyOsmium - Python bindings to Osmium Library.

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.

Copy link
Member

@das-g das-g left a comment

Choose a reason for hiding this comment

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

(nix-shell -I nixpkgs=. -p 'python3.withPackages(p:[p.pyosmium])' seems to work fine.)

nix-shell -I nixpkgs=. -p 'python2.withPackages(p:[p.pyosmium])' fails with

this output (click to expand)
these derivations will be built:
  /nix/store/vxrq1qan2wglcw5xghm4nd7hq604z7x4-python2.7-pyosmium-2.15.3.drv
  /nix/store/la0x3d9s9pw90x8ia5ymhb9dy5c933js-python-2.7.17-env.drv
building '/nix/store/vxrq1qan2wglcw5xghm4nd7hq604z7x4-python2.7-pyosmium-2.15.3.drv'...
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing setuptools-check-hook
unpacking sources
unpacking source archive /nix/store/bc4f7x6z9k3il8rk22d7y9sldrzi5zvb-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/tools/pyosmium-up-to-date
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/share/doc/ -DCMAKE_INSTALL_INFODIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/include -DCMAKE_INSTALL_SBINDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=last -DCMAKE_STRIP=/nix/store/7bhi29ainf5rjrk7k7wyhndyskzyhsxh-binutils-2.31.1/bin/strip -DCMAKE_RANLIB=/nix/store/7bhi29ainf5rjrk7k7wyhndyskzyhsxh-binutils-2.31.1/bin/ranlib -DCMAKE_AR=/nix/store/7bhi29ainf5rjrk7k7wyhndyskzyhsxh-binutils-2.31.1/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/gcc
-- Check for working C compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/g++
-- Check for working CXX compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /nix/store/vz8xrrnnr0r9mglwqzjk25d71vdlryag-zlib-1.2.11/lib/libz.so (found version "1.2.11")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Protozero: /nix/store/y4pqjkw9b040qaj90hqbydnicdzsblyj-protozero-1.6.8/include (found suitable version "1.6.8", minimum required is "1.6.3")
-- Found EXPAT: /nix/store/3pv5r40lw4fkng1cq13m7wxkmpn30ivx-expat-2.2.8/lib/libexpat.so (found version "2.2.8")
-- Found BZip2: /nix/store/ppl5qfxaahvg4rd1mrvgishrzygrhc2c-bzip2-1.0.6.0.1/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Osmium: /nix/store/s5pq9as68qdadld1p91jp79r34r76byc-libosmium-2.15.4/include (found suitable version "2.15.4", minimum required is "2.15")
-- Found PythonInterp: /nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17/bin/python (found version "2.7.17")
-- Found PythonLibs: /nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17/lib/libpython2.7.so
-- Found Boost: /nix/store/igwa6gws9a528lldwvwbr8xwc1s257c6-boost-1.69.0-dev/include (found suitable version "1.69.0", minimum required is "1.55")
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DOCDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_INFODIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_LOCALEDIR
    CMAKE_INSTALL_MANDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR


-- Build files have been written to: /build/source/build
cmake: enabled parallel building
building
Executing setuptoolsBuildPhase
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/osmium
copying src/osmium/helper.py -> build/lib.linux-x86_64-2.7/osmium
copying src/osmium/__init__.py -> build/lib.linux-x86_64-2.7/osmium
copying src/osmium/version.py -> build/lib.linux-x86_64-2.7/osmium
creating build/lib.linux-x86_64-2.7/osmium/osm
copying src/osmium/osm/__init__.py -> build/lib.linux-x86_64-2.7/osmium/osm
copying src/osmium/osm/mutable.py -> build/lib.linux-x86_64-2.7/osmium/osm
creating build/lib.linux-x86_64-2.7/osmium/replication
copying src/osmium/replication/utils.py -> build/lib.linux-x86_64-2.7/osmium/replication
copying src/osmium/replication/__init__.py -> build/lib.linux-x86_64-2.7/osmium/replication
copying src/osmium/replication/server.py -> build/lib.linux-x86_64-2.7/osmium/replication
running build_ext
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/gcc
-- Check for working C compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/g++
-- Check for working CXX compiler: /nix/store/9i8a5iq1kx2adjklqzf9xwrrsnqqnapf-gcc-wrapper-9.2.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /nix/store/vz8xrrnnr0r9mglwqzjk25d71vdlryag-zlib-1.2.11/lib/libz.so (found version "1.2.11")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Protozero: /nix/store/y4pqjkw9b040qaj90hqbydnicdzsblyj-protozero-1.6.8/include (found suitable version "1.6.8", minimum required is "1.6.3")
-- Found EXPAT: /nix/store/3pv5r40lw4fkng1cq13m7wxkmpn30ivx-expat-2.2.8/lib/libexpat.so (found version "2.2.8")
-- Found BZip2: /nix/store/ppl5qfxaahvg4rd1mrvgishrzygrhc2c-bzip2-1.0.6.0.1/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Osmium: /nix/store/s5pq9as68qdadld1p91jp79r34r76byc-libosmium-2.15.4/include (found suitable version "2.15.4", minimum required is "2.15")
-- Found PythonInterp: /nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17/bin/python2.7 (found version "2.7.17")
-- Found PythonLibs: /nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17/lib/libpython2.7.so
-- Found Boost: /nix/store/igwa6gws9a528lldwvwbr8xwc1s257c6-boost-1.69.0-dev/include (found suitable version "1.69.0", minimum required is "1.55")
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /build/source/build/temp.linux-x86_64-2.7
Scanning dependencies of target index
Scanning dependencies of target geom
[ 13%] Building CXX object CMakeFiles/index.dir/lib/index.cc.o
[ 13%] Building CXX object CMakeFiles/geom.dir/lib/geom.cc.o
[ 20%] Linking CXX shared module ../lib.linux-x86_64-2.7/osmium/index.so
[ 26%] Linking CXX shared module ../lib.linux-x86_64-2.7/osmium/geom.so
[ 26%] Built target index
Scanning dependencies of target _replication
[ 33%] Building CXX object CMakeFiles/_replication.dir/lib/replication.cc.o
[ 33%] Built target geom
Scanning dependencies of target io
[ 40%] Building CXX object CMakeFiles/io.dir/lib/io.cc.o
[ 46%] Linking CXX shared module ../lib.linux-x86_64-2.7/osmium/replication/_replication.so
[ 53%] Linking CXX shared module ../lib.linux-x86_64-2.7/osmium/io.so
[ 53%] Built target _replication
Scanning dependencies of target _osmium
[ 60%] Building CXX object CMakeFiles/_osmium.dir/lib/osmium.cc.o
[ 60%] Built target io
Scanning dependencies of target _osm
[ 66%] Building CXX object CMakeFiles/_osm.dir/lib/osm.cc.o
[ 73%] Building CXX object CMakeFiles/_osmium.dir/lib/merge_input_reader.cc.o
[ 80%] Linking CXX shared module ../lib.linux-x86_64-2.7/osmium/osm/_osm.so
[ 86%] Building CXX object CMakeFiles/_osmium.dir/lib/simple_writer.cc.o
[ 86%] Built target _osm
[ 93%] Building CXX object CMakeFiles/_osmium.dir/lib/write_handler.cc.o
[100%] Linking CXX shared module ../lib.linux-x86_64-2.7/osmium/_osmium.so
[100%] Built target _osmium
running build_scripts
creating build/scripts-2.7
copying and adjusting tools/pyosmium-get-changes -> build/scripts-2.7
copying and adjusting tools/pyosmium-up-to-date -> build/scripts-2.7
changing mode of build/scripts-2.7/pyosmium-get-changes from 644 to 755
changing mode of build/scripts-2.7/pyosmium-up-to-date from 644 to 755
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/osmium
copying build/lib.linux-x86_64-2.7/osmium/io.so -> build/bdist.linux-x86_64/wheel/osmium
copying build/lib.linux-x86_64-2.7/osmium/helper.py -> build/bdist.linux-x86_64/wheel/osmium
copying build/lib.linux-x86_64-2.7/osmium/_osmium.so -> build/bdist.linux-x86_64/wheel/osmium
copying build/lib.linux-x86_64-2.7/osmium/index.so -> build/bdist.linux-x86_64/wheel/osmium
copying build/lib.linux-x86_64-2.7/osmium/__init__.py -> build/bdist.linux-x86_64/wheel/osmium
creating build/bdist.linux-x86_64/wheel/osmium/osm
copying build/lib.linux-x86_64-2.7/osmium/osm/__init__.py -> build/bdist.linux-x86_64/wheel/osmium/osm
copying build/lib.linux-x86_64-2.7/osmium/osm/mutable.py -> build/bdist.linux-x86_64/wheel/osmium/osm
copying build/lib.linux-x86_64-2.7/osmium/osm/_osm.so -> build/bdist.linux-x86_64/wheel/osmium/osm
copying build/lib.linux-x86_64-2.7/osmium/geom.so -> build/bdist.linux-x86_64/wheel/osmium
creating build/bdist.linux-x86_64/wheel/osmium/replication
copying build/lib.linux-x86_64-2.7/osmium/replication/utils.py -> build/bdist.linux-x86_64/wheel/osmium/replication
copying build/lib.linux-x86_64-2.7/osmium/replication/__init__.py -> build/bdist.linux-x86_64/wheel/osmium/replication
copying build/lib.linux-x86_64-2.7/osmium/replication/server.py -> build/bdist.linux-x86_64/wheel/osmium/replication
copying build/lib.linux-x86_64-2.7/osmium/replication/_replication.so -> build/bdist.linux-x86_64/wheel/osmium/replication
copying build/lib.linux-x86_64-2.7/osmium/version.py -> build/bdist.linux-x86_64/wheel/osmium
running install_egg_info
running egg_info
creating src/osmium.egg-info
writing src/osmium.egg-info/PKG-INFO
writing top-level names to src/osmium.egg-info/top_level.txt
writing dependency_links to src/osmium.egg-info/dependency_links.txt
writing manifest file 'src/osmium.egg-info/SOURCES.txt'
reading manifest file 'src/osmium.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'contrib/*.dll'
writing manifest file 'src/osmium.egg-info/SOURCES.txt'
Copying src/osmium.egg-info to build/bdist.linux-x86_64/wheel/osmium-2.15.3-py2.7.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/osmium-2.15.3.data
creating build/bdist.linux-x86_64/wheel/osmium-2.15.3.data/scripts
copying build/scripts-2.7/pyosmium-get-changes -> build/bdist.linux-x86_64/wheel/osmium-2.15.3.data/scripts
copying build/scripts-2.7/pyosmium-up-to-date -> build/bdist.linux-x86_64/wheel/osmium-2.15.3.data/scripts
changing mode of build/bdist.linux-x86_64/wheel/osmium-2.15.3.data/scripts/pyosmium-get-changes to 755
changing mode of build/bdist.linux-x86_64/wheel/osmium-2.15.3.data/scripts/pyosmium-up-to-date to 755
adding license file "LICENSE.TXT" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/osmium-2.15.3.dist-info/WHEEL
creating 'dist/osmium-2.15.3-cp27-cp27mu-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'osmium/__init__.py'
adding 'osmium/_osmium.so'
adding 'osmium/geom.so'
adding 'osmium/helper.py'
adding 'osmium/index.so'
adding 'osmium/io.so'
adding 'osmium/version.py'
adding 'osmium/osm/__init__.py'
adding 'osmium/osm/_osm.so'
adding 'osmium/osm/mutable.py'
adding 'osmium/replication/__init__.py'
adding 'osmium/replication/_replication.so'
adding 'osmium/replication/server.py'
adding 'osmium/replication/utils.py'
adding 'osmium-2.15.3.data/scripts/pyosmium-get-changes'
adding 'osmium-2.15.3.data/scripts/pyosmium-up-to-date'
adding 'osmium-2.15.3.dist-info/LICENSE.TXT'
adding 'osmium-2.15.3.dist-info/METADATA'
adding 'osmium-2.15.3.dist-info/WHEEL'
adding 'osmium-2.15.3.dist-info/top_level.txt'
adding 'osmium-2.15.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Finished executing setuptoolsBuildPhase
installing
Executing pipInstallPhase
/build/source/dist /build/source
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing ./osmium-2.15.3-cp27-cp27mu-linux_x86_64.whl
Installing collected packages: osmium
Successfully installed osmium-2.15.3
/build/source
Finished executing pipInstallPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3
shrinking /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib/python2.7/site-packages/osmium/io.so
shrinking /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib/python2.7/site-packages/osmium/_osmium.so
shrinking /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib/python2.7/site-packages/osmium/index.so
shrinking /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib/python2.7/site-packages/osmium/osm/_osm.so
shrinking /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib/python2.7/site-packages/osmium/geom.so
shrinking /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib/python2.7/site-packages/osmium/replication/_replication.so
strip is /nix/store/7bhi29ainf5rjrk7k7wyhndyskzyhsxh-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/lib  /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/bin
patching script interpreter paths in /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3
checking for references to /build/ in /nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3...
Rewriting #!/nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17/bin/python2.7 to #!/nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17
wrapping `/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/bin/pyosmium-get-changes'...
Rewriting #!/nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17/bin/python2.7 to #!/nix/store/cyip0b8gfss5vd7hj6pm5b92fqymkk42-python-2.7.17
wrapping `/nix/store/qiqp0zqw0fmykxwh3wy1xx3gl1insn99-python2.7-pyosmium-2.15.3/bin/pyosmium-up-to-date'...
running install tests
......................................................EE.......................
======================================================================
ERROR: Failure: ImportError (No module named mock)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/krrz5ijpjfkgjazmlkp3snrcvilh5bfs-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/nix/store/krrz5ijpjfkgjazmlkp3snrcvilh5bfs-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/nix/store/krrz5ijpjfkgjazmlkp3snrcvilh5bfs-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/source/test/test_pyosmium_get_changes.py", line 27, in <module>
    from mock import MagicMock, DEFAULT
ImportError: No module named mock

======================================================================
ERROR: Failure: ImportError (No module named mock)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/krrz5ijpjfkgjazmlkp3snrcvilh5bfs-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/nix/store/krrz5ijpjfkgjazmlkp3snrcvilh5bfs-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/nix/store/krrz5ijpjfkgjazmlkp3snrcvilh5bfs-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/build/source/test/test_replication.py", line 16, in <module>
    from mock import MagicMock, patch
ImportError: No module named mock

----------------------------------------------------------------------
Ran 79 tests in 2.020s

FAILED (errors=2)
builder for '/nix/store/vxrq1qan2wglcw5xghm4nd7hq604z7x4-python2.7-pyosmium-2.15.3.drv' failed with exit code 1
cannot build derivation '/nix/store/la0x3d9s9pw90x8ia5ymhb9dy5c933js-python-2.7.17-env.drv': 1 dependencies couldn't be built
error: build of '/nix/store/la0x3d9s9pw90x8ia5ymhb9dy5c933js-python-2.7.17-env.drv' failed

(TL;DR: ImportError: No module named mock in test/test_pyosmium_get_changes.py at line 27 and in ImportError: No module named mock at line 16.)

This is probably because standard library module unittest.mock was added in Python 3.3, so it isn't present in Python 2.7.

The library's automated tests do try to fall back to the third-party implementation, but that would have to be installed for that to work.

Copy link
Member

@das-g das-g left a comment

Choose a reason for hiding this comment

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

This derivation is a Python library (it's placed in pkgs/development/python-modules/... and uses buildPythonPackage) but nonetheless brings to executables with it:

  • pyosmium-get-changes
  • pyosmium-up-to-date

Is that intended and acceptable or should they be split out into a separate application derivation?

@sikmir
Copy link
Member Author

sikmir commented Feb 5, 2020

nix-shell -I nixpkgs=. -p 'python2.withPackages(p:[p.pyosmium])' fails with

Fixed python2 build.

@sikmir
Copy link
Member Author

sikmir commented Feb 5, 2020

Is that intended and acceptable or should they be split out into a separate application derivation?

I guess it's OK, manual provides no farther details:

In the case of Python on Nix, an important distinction is made between whether the package is considered primarily an application, or whether it should be used as a library, i.e., of primary interest are the modules in site-packages that should be importable.

For example pythonPackages.Fabric brings executables as well.

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.

diff LGTM
commit LGTM
upstream looks active
has tests 👍

[5 built, 8 copied (143.6 MiB), 11.1 MiB DL]
https://github.com/NixOS/nixpkgs/pull/79241
3 package built:
python27Packages.pyosmium python37Packages.pyosmium python38Packages.pyosmium

@jonringer
Copy link
Contributor

@GrahamcOfBorg build python27Packages.pyosmium python37Packages.pyosmium python38Packages.pyosmium

@jonringer jonringer merged commit 604762d into NixOS:master Feb 6, 2020
@jonringer
Copy link
Contributor

This derivation is a Python library (it's placed in pkgs/development/python-modules/... and uses buildPythonPackage) but nonetheless brings to executables with it:

* `pyosmium-get-changes`

* `pyosmium-up-to-date`

Is that intended and acceptable or should they be split out into a separate application derivation?

depends on how it's supposed to be consumed. Some python packages are only meant to be an application (E.g. ansible), while other need to be imported as part of someone else's code. For the latter case, this is the correct approach. The executables that are packaged just mean the authors included some entry points into there package.

@sikmir sikmir deleted the pyosmium branch February 6, 2020 20:32
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

3 participants