target / nix-fetchers

A set of morally pure fetching builtins for Nix.
MIT License
43 stars 5 forks source link

Build fetch-git as a python package #9

Closed graham-at-target closed 6 years ago

graham-at-target commented 6 years ago

Unfortunately this is still exposing the brokenness in #6:

Failed to import the site module
Traceback (most recent call last):
  File "/nix/store/4mjdxppls806mby0prf641sdldwcdi0w-python2.7-setuptools-40.0.0/lib/python2.7/site-packages/site.py", line 73, in <module>
    __boot()
  File "/nix/store/4mjdxppls806mby0prf641sdldwcdi0w-python2.7-setuptools-40.0.0/lib/python2.7/site-packages/site.py", line 26, in __boot
    import imp  # Avoid import loop in Python 3
  File "/nix/store/44xxr4wy66ddc5s5ix5zlrl0kvc9mjmr-python3-3.6.4/lib/python3.6/imp.py", line 27, in <module>
    import tokenize
  File "/nix/store/44xxr4wy66ddc5s5ix5zlrl0kvc9mjmr-python3-3.6.4/lib/python3.6/tokenize.py", line 33, in <module>
    import re
  File "/nix/store/44xxr4wy66ddc5s5ix5zlrl0kvc9mjmr-python3-3.6.4/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
error: program '/nix/store/jghb141i0f3cnb8m2j8v2nv0xjaf41sg-fetcher-programs/bin/fetch-git' failed with exit code 1
(use '--show-trace' to show detailed location information)
shlevy commented 6 years ago

??? I thought the python infra sanitized python path :grimacing:

graham-at-target commented 6 years ago

GitHub is confused and showing the commits in the wrong order:

commit c58604cc871ef5f19efe490c4c06c95bc519ef9b (HEAD -> buildPythonPackage, target/buildPythonPackage)
Author: Graham Christensen <graham.christensen@target.com>
Date:   Tue Sep 4 16:01:07 2018 -0400

    Give in to the pythonpath

commit c8a64ace9c9dd1c8f29e825250241515417bda78
Author: Graham Christensen <graham.christensen@target.com>
Date:   Tue Sep 4 16:05:21 2018 -0400

    Add a test which breaks fetch-git's naive treatment of PYTHONPATH

anyway, should be good now and has a test to ensure it keeps working :)

cc @shlevy