Code Monkey home page Code Monkey logo

Comments (12)

willmcgugan avatar willmcgugan commented on August 21, 2024 1

Ah, you may need a more recent setuptools that supports ~=

from metapack.

ericbusboom avatar ericbusboom commented on August 21, 2024

Ah, sorry, documentation error. The program name has been changed to mt with metapack being the subcommand mt pack.

from metapack.

ericbusboom avatar ericbusboom commented on August 21, 2024

I updates the README, but the older documentation still needs to be changed.

from metapack.

roll avatar roll commented on August 21, 2024

@ericbusboom
I've tried td but got this on a fresh virtualenv for Python 3.5.:

$ pip install metapack
$ mt
Traceback (most recent call last):
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 664, in _build_master
    ws.require(__requires__)
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 981, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 872, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (six 1.11.0 (/home/roll/projects/sandbox/.python/lib/python3.5/site-packages), Requirement.parse('six~=1.10.0'), {'rowpipe'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/roll/projects/sandbox/.python/bin/mt", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3142, in <module>
    @_call_aside
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3126, in _call_aside
    f(*args, **kwargs)
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3155, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 666, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 679, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/home/roll/projects/sandbox/.python/lib/python3.5/site-packages/pkg_resources/__init__.py", line 872, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (six 1.11.0 (/home/roll/projects/sandbox/.python/lib/python3.5/site-packages), Requirement.parse('six~=1.10.0'), {'rowpipe'})

Not sure what's package have such a strong dependency version lock.

PS.
To do not create new issue on the http://metatab.org/:

  • link to metatab spec is not working (blue button)
  • link to data data package spec is not working (blue button)

from metapack.

ericbusboom avatar ericbusboom commented on August 21, 2024

The package is fs, which has the dependency for six specified as:

"six~=1.10",

So, you have to manually re-install six:

$ pip uninstall -y six
$ pip install six==1.10.0

There a note about it buried in the README, but I'd really like to find a real fix. I'm almost ready to fork fs. Oddly, this wasn't an issue until I started using the entry points from pkg_resources, which is where the dependency is being checked. Maybe it's actually a bug in pkg_resources?

from metapack.

roll avatar roll commented on August 21, 2024

@ericbusboom
I've proposed a PR to fs. It's probably just a bug because python libraries just can't use dependencies like this (if I correctly understand an used notation).

from metapack.

roll avatar roll commented on August 21, 2024

I've downgraded the six version but I suppose I'm doing something wrong:

$ mt pack -c
CRITICAL: Failed to instantiate generator for class '<class 'rowgenerators.generator.csv.CsvSource'>', ref 'file:/home/roll/projects/sandbox/package/metadata.csv'

from metapack.

ericbusboom avatar ericbusboom commented on August 21, 2024

Hmm... looks familiar. Let me investigate. That's probably a failure in the entry points for generators.

from metapack.

ericbusboom avatar ericbusboom commented on August 21, 2024

BTW, adding '--exceptions' to the command line arguments gives you the full exception trace. In this case, it reveals that the error is because the metadata.csv template didn't get included in the package ( in the source, metatab/templates ) , probably because I screwed up the setup.py file and didn't change the MANIFEST. I've got a branch that I'm working on now which should fix this.

from metapack.

willmcgugan avatar willmcgugan commented on August 21, 2024

Hello. That PR to fs shouldn't really change anything. The six~=1.10 should be equivalent to six>=1.10,<2.0 as I understand it.

What was the issue you are seeing?

from metapack.

ericbusboom avatar ericbusboom commented on August 21, 2024

@willmcgugan The issue occurs entirely outside of fs, when the metatab code is trying to resolve entry_points. It looks like the problem is that pkg_resources, when checking dependencies on entry_points, doesn't understand the '~=' notation and rejects the specification. But, we haven't dug into the problem enough to be sure.

from metapack.

roll avatar roll commented on August 21, 2024

@willmcgugan
My bad. I've missed that PyFilesystem/pyfilesystem2#79 has been resolved.

from metapack.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.