Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

"ZIP does not support timestamps before 1980" when installing wheel #18

Closed
spinus opened this issue May 20, 2016 · 5 comments
Closed

"ZIP does not support timestamps before 1980" when installing wheel #18

spinus opened this issue May 20, 2016 · 5 comments

Comments

@spinus
Copy link

spinus commented May 20, 2016

I'm using current master 2ff7f06
pypi2nix failed on building wheel (wheel is not specified in requirements.txt)

Is there any way to fix this?

Running setup.py bdist_wheel for wheel: started
      Running setup.py bdist_wheel for wheel: finished with status 'error'
      Complete output from command /nix/store/adnbhcy51b4x19fmfci6h0qfy5sarwpr-python-2.7.11/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/nix-build-pypi2nix-pip.drv-0/pip-build-3WGbZ7/wheel/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/nix-build-pypi2nix-pip.drv-0/tmpwrIQWkpip-wheel-:
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib
      creating build/lib/wheel
      copying wheel/wininst2wheel.py -> build/lib/wheel
      copying wheel/util.py -> build/lib/wheel
      copying wheel/pkginfo.py -> build/lib/wheel
      copying wheel/pep425tags.py -> build/lib/wheel
      copying wheel/paths.py -> build/lib/wheel
      copying wheel/metadata.py -> build/lib/wheel
      copying wheel/install.py -> build/lib/wheel
      copying wheel/egg2wheel.py -> build/lib/wheel
      copying wheel/decorator.py -> build/lib/wheel
      copying wheel/bdist_wheel.py -> build/lib/wheel
      copying wheel/archive.py -> build/lib/wheel
      copying wheel/__main__.py -> build/lib/wheel
      copying wheel/__init__.py -> build/lib/wheel
      creating build/lib/wheel/test
      copying wheel/test/test_wheelfile.py -> build/lib/wheel/test
      copying wheel/test/test_tool.py -> build/lib/wheel/test
      copying wheel/test/test_tagopt.py -> build/lib/wheel/test
      copying wheel/test/test_signatures.py -> build/lib/wheel/test
      copying wheel/test/test_ranking.py -> build/lib/wheel/test
      copying wheel/test/test_paths.py -> build/lib/wheel/test
      copying wheel/test/test_keys.py -> build/lib/wheel/test
      copying wheel/test/test_install.py -> build/lib/wheel/test
      copying wheel/test/test_basic.py -> build/lib/wheel/test
      copying wheel/test/__init__.py -> build/lib/wheel/test
      creating build/lib/wheel/tool
      copying wheel/tool/__init__.py -> build/lib/wheel/tool
      creating build/lib/wheel/signatures
      copying wheel/signatures/keys.py -> build/lib/wheel/signatures
      copying wheel/signatures/ed25519py.py -> build/lib/wheel/signatures
      copying wheel/signatures/djbec.py -> build/lib/wheel/signatures
      copying wheel/signatures/__init__.py -> build/lib/wheel/signatures
      running egg_info
      writing requirements to wheel.egg-info/requires.txt
      writing wheel.egg-info/PKG-INFO
      writing top-level names to wheel.egg-info/top_level.txt
      writing dependency_links to wheel.egg-info/dependency_links.txt
      writing entry points to wheel.egg-info/entry_points.txt
      warning: manifest_maker: standard file '-c' not found

      reading manifest file 'wheel.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      no previously-included directories found matching 'wheel/test/*/dist'
      no previously-included directories found matching 'wheel/test/*/build'
      writing manifest file 'wheel.egg-info/SOURCES.txt'
      copying wheel/eggnames.txt -> build/lib/wheel
      copying wheel/test/pydist-schema.json -> build/lib/wheel/test
      copying wheel/test/test-1.0-py2.py3-none-win32.whl -> build/lib/wheel/test
      creating build/lib/wheel/test/complex-dist
      copying wheel/test/complex-dist/setup.py -> build/lib/wheel/test/complex-dist
      creating build/lib/wheel/test/complex-dist/complexdist
      copying wheel/test/complex-dist/complexdist/__init__.py -> build/lib/wheel/test/complex-dist/complexdist
      creating build/lib/wheel/test/headers.dist
      copying wheel/test/headers.dist/header.h -> build/lib/wheel/test/headers.dist
      copying wheel/test/headers.dist/headersdist.py -> build/lib/wheel/test/headers.dist
      copying wheel/test/headers.dist/setup.py -> build/lib/wheel/test/headers.dist
      creating build/lib/wheel/test/simple.dist
      copying wheel/test/simple.dist/setup.py -> build/lib/wheel/test/simple.dist
      creating build/lib/wheel/test/simple.dist/simpledist
      copying wheel/test/simple.dist/simpledist/__init__.py -> build/lib/wheel/test/simple.dist/simpledist
      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/wheel
      copying build/lib/wheel/eggnames.txt -> build/bdist.linux-x86_64/wheel/wheel
      creating build/bdist.linux-x86_64/wheel/wheel/signatures
      copying build/lib/wheel/signatures/__init__.py -> build/bdist.linux-x86_64/wheel/wheel/signatures
      copying build/lib/wheel/signatures/djbec.py -> build/bdist.linux-x86_64/wheel/wheel/signatures
      copying build/lib/wheel/signatures/ed25519py.py -> build/bdist.linux-x86_64/wheel/wheel/signatures
      copying build/lib/wheel/signatures/keys.py -> build/bdist.linux-x86_64/wheel/wheel/signatures
      creating build/bdist.linux-x86_64/wheel/wheel/tool
      copying build/lib/wheel/tool/__init__.py -> build/bdist.linux-x86_64/wheel/wheel/tool
      creating build/bdist.linux-x86_64/wheel/wheel/test
      creating build/bdist.linux-x86_64/wheel/wheel/test/simple.dist
      creating build/bdist.linux-x86_64/wheel/wheel/test/simple.dist/simpledist
      copying build/lib/wheel/test/simple.dist/simpledist/__init__.py -> build/bdist.linux-x86_64/wheel/wheel/test/simple.dist/simpledist
      copying build/lib/wheel/test/simple.dist/setup.py -> build/bdist.linux-x86_64/wheel/wheel/test/simple.dist
      creating build/bdist.linux-x86_64/wheel/wheel/test/headers.dist
      copying build/lib/wheel/test/headers.dist/setup.py -> build/bdist.linux-x86_64/wheel/wheel/test/headers.dist
      copying build/lib/wheel/test/headers.dist/headersdist.py -> build/bdist.linux-x86_64/wheel/wheel/test/headers.dist
      copying build/lib/wheel/test/headers.dist/header.h -> build/bdist.linux-x86_64/wheel/wheel/test/headers.dist
      creating build/bdist.linux-x86_64/wheel/wheel/test/complex-dist
      creating build/bdist.linux-x86_64/wheel/wheel/test/complex-dist/complexdist
      copying build/lib/wheel/test/complex-dist/complexdist/__init__.py -> build/bdist.linux-x86_64/wheel/wheel/test/complex-dist/complexdist
      copying build/lib/wheel/test/complex-dist/setup.py -> build/bdist.linux-x86_64/wheel/wheel/test/complex-dist
      copying build/lib/wheel/test/test-1.0-py2.py3-none-win32.whl -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/pydist-schema.json -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/__init__.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_basic.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_install.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_keys.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_paths.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_ranking.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_signatures.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_tagopt.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_tool.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/test/test_wheelfile.py -> build/bdist.linux-x86_64/wheel/wheel/test
      copying build/lib/wheel/__init__.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/__main__.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/archive.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/bdist_wheel.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/decorator.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/egg2wheel.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/install.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/metadata.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/paths.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/pep425tags.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/pkginfo.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/util.py -> build/bdist.linux-x86_64/wheel/wheel
      copying build/lib/wheel/wininst2wheel.py -> build/bdist.linux-x86_64/wheel/wheel
      running install_egg_info
      Copying wheel.egg-info to build/bdist.linux-x86_64/wheel/wheel-0.29.0-py2.7.egg-info
      running install_scripts
      creating build/bdist.linux-x86_64/wheel/wheel-0.29.0.dist-info/WHEEL
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/nix-build-pypi2nix-pip.drv-0/pip-build-3WGbZ7/wheel/setup.py", line 56, in <module>
          bdist_wheel = wheel.bdist_wheel:bdist_wheel"""
        File "/nix/store/adnbhcy51b4x19fmfci6h0qfy5sarwpr-python-2.7.11/lib/python2.7/distutils/core.py", line 151, in setup
          dist.run_commands()
        File "/nix/store/adnbhcy51b4x19fmfci6h0qfy5sarwpr-python-2.7.11/lib/python2.7/distutils/dist.py", line 953, in run_commands
          self.run_command(cmd)
        File "/nix/store/adnbhcy51b4x19fmfci6h0qfy5sarwpr-python-2.7.11/lib/python2.7/distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "/tmp/nix-build-pypi2nix-pip.drv-0/pip-build-3WGbZ7/wheel/wheel/bdist_wheel.py", line 241, in run
          wheel_name = archive_wheelfile(pseudoinstall_root, archive_root)
        File "/tmp/nix-build-pypi2nix-pip.drv-0/pip-build-3WGbZ7/wheel/wheel/archive.py", line 22, in archive_wheelfile
          return make_wheelfile_inner(base_name)
        File "/tmp/nix-build-pypi2nix-pip.drv-0/pip-build-3WGbZ7/wheel/wheel/archive.py", line 72, in make_wheelfile_inner
          writefile(path, date_time)
        File "/tmp/nix-build-pypi2nix-pip.drv-0/pip-build-3WGbZ7/wheel/wheel/archive.py", line 57, in writefile
          zinfo = zipfile.ZipInfo(path, date_time)
        File "/nix/store/adnbhcy51b4x19fmfci6h0qfy5sarwpr-python-2.7.11/lib/python2.7/zipfile.py", line 305, in __init__
          raise ValueError('ZIP does not support timestamps before 1980')
      ValueError: ZIP does not support timestamps before 1980

      ----------------------------------------
      Failed building wheel for wheel
      Running setup.py clean for wheel
      Running setup.py bdist_wheel for setuptools: started
      Running setup.py bdist_wheel for setuptools: finished with status 'done'
      Stored in directory: /tmp/pypi2nix/cache/79814f01698139e54a826f177972a660
    Successfully built boto cffi cryptography funcsigs hashids idna ipaddress psycopg2 pyasn1 pycparser pyopenssl python-dateutil setuptools
    Failed to build wheel
    ERROR: Failed to build one or more wheels
    The directory '/homeless-shelter/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    You are using pip version 8.1.1, however version 8.1.2 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    builder for ‘/nix/store/9fs9z52568x0z1nrv79rqq6r2zkh88rc-pypi2nix-pip.drv’ failed with exit code 1
    error: build of ‘/nix/store/9fs9z52568x0z1nrv79rqq6r2zkh88rc-pypi2nix-pip.drv’ failed
@garbas
Copy link
Contributor

garbas commented Jun 28, 2016

can you check if this work with current master. i know i fixed this issue in the past. please reopen the ticket and provide me with requirements.txt that you use to generate nix expressions from.

@garbas garbas closed this as completed Jun 28, 2016
@spinus
Copy link
Author

spinus commented Jun 29, 2016

cool, thanks

@emorikawa
Copy link

For those coming in from Google on this error, it's very possible there are in fact files that have corrupt touch dates older than 1980. This raises when the mtime of a file in the packaging tree is older than 1980. This even happened for me when zip_safe was set to False

You can see if you have any of these files with: find . -mtime +13700 -ls

My fix was to touch offending files and exclude some unnecessary dirs in my Manifest.in.

See also NixOS/nixpkgs#270 and aws/aws-cli#2639 and noirbizarre/django-eztables#16

@psychok7
Copy link

@emorikawa any idea how we could get these corrupt touch dates? i removed the files that find . -mtime +13700 -ls showed and it works now. but i have several other files with a 1970 date

@mrculler
Copy link

Note for anyone else coming here from Google - you may get this issue even after recursively touching all possibly offending files if (like me) you're on an embedded system that hasn't had its date set! So newly created files are marked as being from 1970.

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

No branches or pull requests

5 participants