Author stefan.richthofer
Recipients seletz, stefan.richthofer
Date 2017-02-22.03:16:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I just noted that installing scandir in Jython via pip fails:

bin/pip install scandir
Collecting scandir
  Using cached scandir-1.5.tar.gz
Installing collected packages: scandir
  Running install for scandir ... error
    Complete output from command /data/workspace/linux/Jython/installer_test/linux_2.7.1/bin/jython -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-88durY/scandir/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-wqw0MV-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.java1.8.0_121-2.7
    copying -> build/lib.java1.8.0_121-2.7
    running build_ext
    building '_scandir' extension
    error: Compiling extensions is not supported on Jython
Command "/data/workspace/linux/Jython/installer_test/linux_2.7.1/bin/jython -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-88durY/scandir/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-wqw0MV-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-88durY/scandir/

It tries to build a C-extension, which isn't supported in Jython. However, scandir actually works with Jython if you install it by hand, i.e. without running its, but just copy into a suitable location; it's only the setup that fails.
(scandir has all sorts of fallbacks letting it work without the C-extension; I only tried this on Linux so far however)

I am about to file a separate issue for this, just posting the info here right now, because that also breaks pathlib2 setup via pip. You can however make it work by handcrafted setup for now.
Date User Action Args
2017-02-22 03:16:48stefan.richthofersetmessageid: <>
2017-02-22 03:16:48stefan.richthofersetrecipients: + stefan.richthofer, seletz
2017-02-22 03:16:47stefan.richthoferlinkissue2475 messages
2017-02-22 03:16:46stefan.richthofercreate