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

python35Packages.tornado fails to build #14634

Closed
berdario opened this issue Apr 12, 2016 · 32 comments
Closed

python35Packages.tornado fails to build #14634

berdario opened this issue Apr 12, 2016 · 32 comments
Labels

Comments

@berdario
Copy link
Contributor

Issue description

This is the traceback:

Traceback (most recent call last):
  File "nix_run_setup.py", line 6, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 173, in <module>
    **kwargs
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/nix/store/0wq9m1x1yx2bgin1cxbv71q24m6v1j83-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 159, in run
  File "/nix/store/0wq9m1x1yx2bgin1cxbv71q24m6v1j83-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 140, in with_project_on_sys_path
  File "/nix/store/0wq9m1x1yx2bgin1cxbv71q24m6v1j83-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 180, in run_tests
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/main.py", line 93, in __init__
    self.parseArgs(argv)
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/main.py", line 123, in parseArgs
    self._do_discovery([])
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/main.py", line 228, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/0wq9m1x1yx2bgin1cxbv71q24m6v1j83-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 38, in loadTestsFromModule
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/nix/store/0wq9m1x1yx2bgin1cxbv71q24m6v1j83-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 38, in loadTestsFromModule
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/tmp/nix-build-python3.5-tornado-4.2.1.drv-0/tornado-4.2.1/tornado/platform/windows.py", line 7, in <module>
    import ctypes.wintypes
  File "/nix/store/ggig9ccdxx7wfvkjjdv2rrk3878q5nhj-python3-3.5.1/lib/python3.5/ctypes/wintypes.py", line 20, in <module>
    class VARIANT_BOOL(ctypes._SimpleCData):
ValueError: _type_ 'v' not supported

doing anything with tornado/platform/windows.py seems obviously wrong.
Python3.4 seems to build fine.

This causes a build failure for reverse-depends packages like urllib3... urllib3's tests are disabled on Python3, and tornado is only a test dependency, which can thus be safely removed.

I also tried to upgrade to Tornado 4.3, but the error is still there.

I tried to simply remove the tornado dependency by overriding it with

urllib3_ = pkgs.stdenv.lib.overrideDerivation pkgs.python35Packages.urllib3 (oldAttrs: {
  nativeBuildInputs = with pkgs.python35Packages; [ coverage mock nose ];
});

But I get this weird error:

cat: test-requirements.txt: No such file or directory
building
usage: nix_run_setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
  or: nix_run_setup.py --help [cmd1 cmd2 ...]
  or: nix_run_setup.py --help-commands
  or: nix_run_setup.py cmd --help

error: invalid command 'bdist_wheel'

(I sorted it out by completely duplicating the urllib3 definition, if you have any suggestions, please chime in)

Steps to reproduce

nix-env -f '<nixpkgs>' -iA python35Packages.tornado

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)

Ubuntu 16.04

  • Nix version: (run nix-env --version)

nix-env (Nix) 1.11.2

  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

git trunk

@grahamc
Copy link
Member

grahamc commented Apr 12, 2016

This works for me on master, but have run in to this very same problem. Very weird.

@joachifm joachifm added 0.kind: bug Something is broken 6.topic: python labels Apr 12, 2016
@joachifm
Copy link
Contributor

cc @FRidh

@FRidh
Copy link
Member

FRidh commented Apr 13, 2016

@berdario can you give a specific revision/commit of the nixpkgs repo?
It builds fine with a14decf

By the way, why are you installing tornado to your profile? If you want to test a package I recommend you use nix-shell -p python35Packages.tornado --pure

@berdario
Copy link
Contributor Author

@FRidh I'm using nix-env -i because nix-shell doesn't have the -f flag (which I'm using in this case for example to select the nixpkgs clone, which I added to NIX_PATH as <nixtrunk>)

My nixpkgs was at commit 4897276, I just git pulled and the problem also happens at 81cedab, as well as a14decf

I presume that maybe the tornado tests aren't properly isolated/reproducible and will fail on a Ubuntu system while running fine on Nixos?

@FRidh
Copy link
Member

FRidh commented Apr 13, 2016

@berdario I see. Maybe of interest to you is nix-shell -I nixpkgs=/path/to/repo
I'm building packages in a chroot.

This is an interesting problem. Do you have any packageOverrides in your $HOME/.nixpkgs/config.nix?

@berdario
Copy link
Contributor Author

Indeed, I have a few. This is my config.nix

@FRidh
Copy link
Member

FRidh commented Apr 13, 2016

it happens more often that we encounter Windows-only "bugs" with Python packages on Nix. A couple of times I encountered Pandas bugs which are reported upstream as only to happen with Windows.

It seems to happen when searching for unit tests. Since the setuptools upgrade the unittest test runner is quite aggressive with trying to find tests. I've seen before differences in its behavior between the Python versions.

Could you try with pytest?

buildInputs = with self; [ pytest ];
checkPhase = ''
  py.test
'';

@berdario
Copy link
Contributor Author

I'll try it when I'll get back at my computer... But where should I add the py. Test dependency? To my project shell.nix? Or to tornado's definition in my nixpkgs clone?

Sent from mobile. Please excuse my brevity.

@FRidh
Copy link
Member

FRidh commented Apr 13, 2016

Tornados expression in nixpkgs
On Apr 13, 2016 9:31 AM, "berdario" [email protected] wrote:

I'll try it when I'll get back at my computer... But where should I add
the py. Test dependency? To my project shell.nix? Or to tornado's

definition in my nixpkgs clone?

Sent from mobile. Please excuse my brevity.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#14634 (comment)

@berdario
Copy link
Contributor Author

Indeed, it seems that the error disappears, but there are even more failures in other parts of the test suite:

https://gist.github.com/anonymous/7c7c58620b7b96aca8e4f7dfcd73c37f

@FRidh
Copy link
Member

FRidh commented Apr 13, 2016

That's unfortunately often the case when changing test runner.

What I don't like is that the behaviour is different with Nix than on
NixOS. Did you enable Nix Chroot. If not, please do so and try again
without pytest.
On Apr 13, 2016 10:16 AM, "berdario" [email protected] wrote:

Indeed, it seems that the error disappears, but there are even more
failures in other parts of the test suite:

https://gist.github.com/anonymous/7c7c58620b7b96aca8e4f7dfcd73c37f


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#14634 (comment)

@berdario
Copy link
Contributor Author

Do you mean this chroot?

https://github.com/lethalman/nix-user-chroot

@FRidh
Copy link
Member

FRidh commented Apr 13, 2016

With nix-env you can use.

--option build-use-chroot true

@berdario
Copy link
Contributor Author

Uhm, the nix installer doesn't setup users and groups... I haven't been able to find the instructions to do it in the nixos manual.

I adapted the instructions from the ones specified in the Guix manual

and I executed

 sudo (which nix-env) -I nixpkgs=/home/dario/nixpkgs -f '<nixpkgs>' -iA python35Packages.tornado --option build-use-chroot true

But I get the same error

@berdario
Copy link
Contributor Author

FWIW, I suspect that running a chrooted nix-env build under sudo borked up multiple files on my system.

Both ~/.config/fish/fishd.myhostname and /nix/store got owned by root

@benthor
Copy link

benthor commented Apr 15, 2016

I have a very similar issue. I attempt a build via nix-env -iA nixos.python35Packages.tornado but it fails with

File "/tmp/nix-build-python3.5-tornado-4.2.1.drv-0/tornado-4.2.1/tornado/platform/kqueue.py", line 23, in <module>
    assert hasattr(select, 'kqueue'), 'kqueue not supported'
AssertionError: kqueue not supported
builder for ‘/nix/store/s32ylw2jql4fbphb1fyzlgrldmn5bmig-python3.5-tornado-4.2.1.drv’ failed with exit code 1
error: build of ‘/nix/store/s32ylw2jql4fbphb1fyzlgrldmn5bmig-python3.5-tornado-4.2.1.drv’ failed

A bit of googling reveals that kqueue is a BSD system call. Linux uses epoll instead. Maybe the build system has a messed-up OS check somewhere?

@FRidh
Copy link
Member

FRidh commented Apr 20, 2016

@benthor do you have more you can show? Did it fail during building, or during testing?

Tornado imports select, and uses hasattr do determine whether epoll exists or kqueue.
https://github.com/tornadoweb/tornado/blob/v4.2.1/tornado/ioloop.py#L237

Apparently that succeeds, so it imports code from Tornado's kqueue module, where it checks again whether kqueue is available, but now it fails
https://github.com/tornadoweb/tornado/blob/v4.2.1/tornado/platform/kqueue.py#L23

Note that it is possible that, based on what you showed, it went straight to the second part instead of the first part. If that's the case I'm pretty sure it failed for @benthor in the check phase.

@benthor
Copy link

benthor commented Apr 20, 2016

I apologize. Posting more of the relevant output:

patching script interpreter paths in /nix/store/vh6a5wf3p5wmx3nxw601mnxh3gahg0x5-python3.5-tornado-4.2.1
running install tests
running test
running egg_info
writing dependency_links to tornado.egg-info/dependency_links.txt
writing top-level names to tornado.egg-info/top_level.txt
writing tornado.egg-info/PKG-INFO
reading manifest file 'tornado.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
warning: no files found matching 'tornado/test/README'
writing manifest file 'tornado.egg-info/SOURCES.txt'
running build_ext
building 'tornado.speedups' extension
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/include/python3.5m -c tornado/speedups.c -o build/temp.linux-x86_64-3.5/tornado/speedups.o
tornado/speedups.c:44:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 PyInit_speedups() {
 ^
gcc -pthread -shared -L/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/lib -L/nix/store/ymjf7jwbg1xidafhksi9csqzfsb02zqx-bzip2-1.0.6/lib -L/nix/store/gjiakvrh8d8pvsagqqb42c6l7hc4gf9l-xz-5.2.2/lib -L/nix/store/93kinhj1zraz7i9rs2m767bcfdmpsd0j-gdbm-1.11/lib -L/nix/store/h9if01ddhdlnjd1j78rnzq7pdd3mflf9-sqlite-3.11.1/lib -L/nix/store/gdy1s8lc4x3w5daq9x74cr7nnvqh2wz3-db-5.3.28/lib -L/nix/store/8zai681fnx52v4kadm4mq9jzd7vlqzav-readline-6.3p08/lib -L/nix/store/frv0qy52hk6vv1fn6nh7m4grw7qxsydy-ncurses-5.9/lib -L/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r/lib -L/nix/store/3qli17qx3lkmfagpkn0m5qrwjzlcijg0-tcl-8.6.4/lib -L/nix/store/m09zga9nk42cnjff4j3zszilnfx3kpch-tk-8.6.4/lib -L/nix/store/0nyp0fxp6pa8r6y2zg5rwxlcjddafcp6-libX11-1.6.3/lib -L/nix/store/f69f8c8jn84nczk8kpcbmwk5wm91p6bg-xproto-7.0.28/lib build/temp.linux-x86_64-3.5/tornado/speedups.o -L/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib -lpython3.5m -o /tmp/nix-build-python3.5-tornado-4.2.1.drv-0/tornado-4.2.1/tornado/speedups.cpython-35m-x86_64-linux-gnu.so
Traceback (most recent call last):
  File "nix_run_setup.py", line 6, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 173, in <module>
    **kwargs
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/nix/store/8qi91pnjxk49s3nzgs2y4xqnrwpraxsl-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 159, in run
  File "/nix/store/8qi91pnjxk49s3nzgs2y4xqnrwpraxsl-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 140, in with_project_on_sys_path
  File "/nix/store/8qi91pnjxk49s3nzgs2y4xqnrwpraxsl-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 180, in run_tests
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/main.py", line 93, in __init__
    self.parseArgs(argv)
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/main.py", line 123, in parseArgs
    self._do_discovery([])
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/main.py", line 228, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/8qi91pnjxk49s3nzgs2y4xqnrwpraxsl-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 38, in loadTestsFromModule
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/nix/store/8qi91pnjxk49s3nzgs2y4xqnrwpraxsl-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 38, in loadTestsFromModule
  File "/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1/lib/python3.5/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/tmp/nix-build-python3.5-tornado-4.2.1.drv-0/tornado-4.2.1/tornado/platform/kqueue.py", line 23, in <module>
    assert hasattr(select, 'kqueue'), 'kqueue not supported'
AssertionError: kqueue not supported
builder for ‘/nix/store/s32ylw2jql4fbphb1fyzlgrldmn5bmig-python3.5-tornado-4.2.1.drv’ failed with exit code 1
error: build of ‘/nix/store/s32ylw2jql4fbphb1fyzlgrldmn5bmig-python3.5-tornado-4.2.1.drv’ failed

Is this more informative?

@FRidh
Copy link
Member

FRidh commented Apr 20, 2016

Thanks. So this is also in the checkPhase.

@FRidh FRidh mentioned this issue May 9, 2016
7 tasks
teh added a commit to teh/nixpkgs that referenced this issue May 12, 2016
@FRidh
Copy link
Member

FRidh commented May 12, 2016

Tests of Tornado have been disabled for now (5b78292).

@garbas
Copy link
Member

garbas commented May 24, 2016

@FRidh should we just patch tornado in ioloop.py and select epoll on linux and kqueue on bsd?

@FRidh
Copy link
Member

FRidh commented May 25, 2016

@garbas If I understand correctly what is happening, ioloop.py does function correctly and imports kqueue or epoll based on what it detected.

The problem is the test runner (#14849). It tries to import all modules to determine whether is has tests, including the one with kqueue which thus will fail.

Do we support Nix on BSD systems? If not, I suggest we just remove kqueue.py.

@FRidh
Copy link
Member

FRidh commented May 25, 2016

ahh, darwin of course uses kqueue.

@FRidh
Copy link
Member

FRidh commented May 25, 2016

we could override the checkPhase with python -m unittest discover "*_test.py" since tornado uses this pattern instead of the more usual "test_*.py"

@FRidh FRidh closed this as completed in 6876eab Jul 6, 2016
@aljones15
Copy link

getting the same error:

running install tests
running test
running egg_info
writing tornado.egg-info/PKG-INFO
writing dependency_links to tornado.egg-info/dependency_links.txt
writing top-level names to tornado.egg-info/top_level.txt
reading manifest file 'tornado.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
warning: no files found matching 'tornado/test/README'
writing manifest file 'tornado.egg-info/SOURCES.txt'
running build_ext
building 'tornado.speedups' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/include/python3.5m -c tornado/speedups.c -o build/temp.linux-x86_64-3.5/tornado/speedups.o
tornado/speedups.c:44:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
PyInit_speedups() {
^
gcc -pthread -shared -L/nix/store/slbij3ypl8w60kdyynylmyc6pfc8k4vf-zlib-1.2.8/lib -L/nix/store/rm9fycfaprdr0zmkssmb5rg1g59w82lp-bzip2-1.0.6/lib -L/nix/store/6w0wrgc9yvzk0lncc6wxpdixdmqspp3f-xz-5.2.2/lib -L/nix/store/yb985gphba1kpnjgj9hxvrsfx617kwfb-gdbm-1.11/lib -L/nix/store/2q5hjn9dwng5bxg5z4jm9k459m2nwial-sqlite-3.9.2/lib -L/nix/store/jsz58b7kr9542xi56gfiismyaxj3brpd-db-5.3.28/lib -L/nix/store/nilqh70fcqcansqllvdmghnjl7c2zmiq-readline-6.3p08/lib -L/nix/store/ihkcrpmhw7v8gss4zhdfx5zbvxpan06i-ncurses-5.9/lib -L/nix/store/rd3vkplhbnzrq8fz4p0aqyx0clrdzbzr-openssl-1.0.2h/lib -L/nix/store/sm4rmrcxxppvsszvg8ays5nk3zd9l2n4-tcl-8.6.4/lib -L/nix/store/gxdbh3ax15hnmig0ihaqp3cmhi01dc31-tk-8.6.4/lib -L/nix/store/jcxqplkddl4lj6h9xwd9ydisga8pr7vh-libX11-1.6.3/lib -L/nix/store/5gl06szqj0zss5qhkvgjlz1lwli7m9c0-xproto-7.0.28/lib build/temp.linux-x86_64-3.5/tornado/speedups.o -L/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib -lpython3.5m -o /tmp/nix-build-python3.5-tornado-4.2.1.drv-0/tornado-4.2.1/tornado/speedups.cpython-35m-x86_64-linux-gnu.so
Traceback (most recent call last):
File "nix_run_setup.py", line 6, in
exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))
File "setup.py", line 173, in
**kwargs
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/nix/store/dhgvhcx4cm5ggvka67gfz8izfd3gd0i6-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 159, in run
File "/nix/store/dhgvhcx4cm5ggvka67gfz8izfd3gd0i6-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 140, in with_project_on_sys_path
File "/nix/store/dhgvhcx4cm5ggvka67gfz8izfd3gd0i6-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 180, in run_tests
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/main.py", line 93, in init
self.parseArgs(argv)
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/main.py", line 123, in parseArgs
self._do_discovery([])
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/main.py", line 228, in _do_discovery
self.test = loader.discover(self.start, self.pattern, self.top)
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/loader.py", line 341, in discover
tests = list(self._find_tests(start_dir, pattern))
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/loader.py", line 398, in _find_tests
full_path, pattern, namespace)
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/loader.py", line 475, in _find_test_path
tests = self.loadTestsFromModule(package, pattern=pattern)
File "/nix/store/dhgvhcx4cm5ggvka67gfz8izfd3gd0i6-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 38, in loadTestsFromModule
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/loader.py", line 190, in loadTestsFromName
return self.loadTestsFromModule(obj)
File "/nix/store/dhgvhcx4cm5ggvka67gfz8izfd3gd0i6-python3.5m-setuptools-19.4/lib/python3.5/site-packages/setuptools-19.4-py3.5.egg/setuptools/command/test.py", line 38, in loadTestsFromModule
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/unittest/loader.py", line 153, in loadTestsFromName
module = import(module_name)
File "/tmp/nix-build-python3.5-tornado-4.2.1.drv-0/tornado-4.2.1/tornado/platform/windows.py", line 7, in
import ctypes.wintypes
File "/nix/store/qblj6pk8067czq8ya6bfllfvy0mndqjh-python3-3.5.2/lib/python3.5/ctypes/wintypes.py", line 20, in
class VARIANT_BOOL(ctypes._SimpleCData):
ValueError: type 'v' not supported
builder for ‘/nix/store/lw4dgw03s82khh0x6hv6pysxd7c838ma-python3.5-tornado-4.2.1.drv’ failed with exit code 1
error: build of ‘/nix/store/lw4dgw03s82khh0x6hv6pysxd7c838ma-python3.5-tornado-4.2.1.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies

@FRidh
Copy link
Member

FRidh commented Sep 22, 2016

what is your nixpkgs version?

@aljones15
Copy link

aljones15 commented Sep 22, 2016

nix-channel (Nix) 1.11.2

nix-env (Nix) 1.11.2

nix-shell (Nix) 1.11.2

is that correct?

nixos.python35Packages.tornado_4_0_1 python3.5-tornado-4.0.1
nixos.python35Packages.tornado python3.5-tornado-4.2.1
nixos.python35Packages.tornadokick python3.5-tornadokick-0.2.1

maybe I sjould try specifying 4.2.1?

@FRidh
Copy link
Member

FRidh commented Sep 22, 2016

No, that is the version of the package manager. I need to know the version of the packages repository, that is, this repository. If you are on NixOS, you can run

nixos-version

Otherwise,

nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

@aljones15
Copy link

aljones15 commented Sep 22, 2016

nixos-version
16.03.1130.2568ee3 (Emu)

nix-instantiate --eval '' -A lib.nixpkgsVersion
"16.03.1299.a8e0739"

@FRidh
Copy link
Member

FRidh commented Sep 22, 2016

This fix hasn't been backported to 16.03 stable. It is available on unstable and the upcoming 16.09.

@aljones15
Copy link

anything I can add to my default.nix to get it working today? I think just turning off the tests will work?

we could override the checkPhase with python -m unittest discover "test.py" since tornado uses this pattern instead of the more usual "test.py"

I'll google it, but if it is possuible to overide the check phase and that solves it then thanks,

FRidh pushed a commit that referenced this issue Sep 22, 2016
(cherry picked from commit 5b78292)
FRidh added a commit that referenced this issue Sep 22, 2016
The test runner would import all modules to check whether they might
have tests.

On a Linux system it would load the Tornado module that depends on
kqueue, which is BSD only, and fail.

(cherry picked from commit 6876eab)
@FRidh
Copy link
Member

FRidh commented Sep 22, 2016

I've pushed the fix to release-16.03 (see the last two commits of that branch).

adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
(cherry picked from commit 5b78292)
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
The test runner would import all modules to check whether they might
have tests.

On a Linux system it would load the Tornado module that depends on
kqueue, which is BSD only, and fail.

(cherry picked from commit 6876eab)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants