Closed e3krisztian closed 11 years ago
It turns out, that setup.py already directly links to the proper place:
dependency_links = [
'https://github.com/ceumicrodata/tarr/archive/tarr-0.1.1.zip',
'https://github.com/bfaludi/XML2Dict/archive/master.zip#egg=xml2dict-0.1'
],
after
pip install https://github.com/bfaludi/XML2Dict/archive/master.zip#egg=xml2dict-0.1
and
pinpointing xml2dict to version 0.1 in setup.py
xml2dict==0.1
Without pinpointing to the exact version, the install fails as previously.
pip install -e .
works.
May it be that, the other version is newer (0.2.1)?
No, the current xml2dict version is 0.1 what the mETL is using. I think the problem You have an another xml2dict package installed on your computer, because many package available with the same name.
I am using virtualenvs, so I am isolated from any unknown installed packages, so no, I do not have any other xml2dict
installed.
It is pip
that installs it based on setup.py
and searching PyPI
.
I was running pip
1.3.1
(2013-03-08) and 1.4.1
(2013-08-07) (with current setuptools
1.1
), neither works.
It turned out, that pip
does not do proper dependency resolution:
https://github.com/pypa/pip/issues/1134 https://github.com/pypa/pip/issues/988
https://devcenter.heroku.com/articles/python-pip
I have tried to create a requirements.txt
file pinpointing the exact versions, but dependencies from setup.py
still make pip
pull in the wrong XML2Dict
.
mkvirtualenv metl
pip install https://github.com/ceumicrodata/mETL/tarball/master
or better
mkvirtualenv metl
pip install mETL
should work without previously downloading/cloning anything and without polluting any user visible directory with python files - they are of help only for developers.
This issue also prevents mETL
being released to PyPI
(I do not know if there is such a plan, but it would make it more visible/used), as there is already a different (and probably broken) XML2Dict
there.
Can XML2Dict
be renamed (and possibly released to PyPI
)?
Yes, the package will be released to PyPI. I will found an another name for the package but I have not got any naming idea. Do you have any proposal?
I have glanced over it - it is pretty simple & nice package!
At first I though that XML2Dict
is about the right name, it just need a differentiating word prefix, but not anymore: although it is a dict, that is created, but that dict is usually not a flat dict.
It somehow resembles JSON, except that the output is not a string, so XML2JSON
is also discarded.
XML2Native
is about the most correct variant in the above family.
What about naming it xmlsquash
?
Its a pretty unique name!
https://www.google.com/search?q=xmlsquash
There is one thing that I spotted as potential problem: attributes are treated as sub-elements (probably intentionally), but what would be the result of parsing
<item x="3">
<x>4</x>
</item>
?
I renamed it, the xmlsquash is quite good idea, thank you. :) You have right, this case was wrong. I fixed it. Current result of parsing for your example:
{u'x': {u'text': u'4'}, u'x:attr': u'3'}
Installing current master with
fails with this:
apparently it tries to install
https://pypi.python.org/pypi/XML2Dict/0.2.1 (https://github.com/mcspring/XML2Dict)
instead of
https://github.com/bfaludi/XML2Dict
Proposed solutions: