Open GoogleCodeExporter opened 8 years ago
This is a packager problem and not a problem with the library itself.
Original comment by jcgregorio@google.com
on 24 Nov 2013 at 6:35
Trying to use Conflicts to make it more obvious shows the extent of the
interdependence. I'm trying to support bigquery in fink but oauth2client
needed, so I have to write a patch the tar to move uritemplate/__init__.py.
fink remove --recursive uritemplate-py27
The following packages will be REMOVED:
bigquery-py27 google-api-python-client-py27 gsutil-py27 oauth2client-py27 uritemplate-py27
0 packages upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Original comment by schw...@gmail.com
on 24 Nov 2013 at 6:56
The oauth2client library merely has uritemplate as a dependent package:
http://code.google.com/p/google-api-python-client/source/browse/setup_oauth2client.py#24
Are you suggesting libraries should have *no* dependent packages?
Original comment by jcgregorio@google.com
on 24 Nov 2013 at 7:17
I think we have some miss-communication. It's perfectly find to have dependent
packages. I'm suggesting that using top level package names that already exist
in pypi and that related Google tools use is risky.
(https://pypi.python.org/pypi/uritemplate and
https://pypi.python.org/pypi/uritemplate.py/)
But here we've got uritemplate being used by other Google packages as an
external dependency and this package is exporting a different uritemplate. And
only gce needs it.
Here is how to see the issues that I'm running into:
wget --no-check-certificate
https://google-api-python-client.googlecode.com/files/oauth2client-1.2.tar.gz
tar tfvv oauth2client-1.2.tar.gz | grep uritemplate
drwxr-x--- jcgregorio/eng 0 2013-08-07 09:18 oauth2client-1.2/uritemplate/
-rw-r----- jcgregorio/eng 4780 2013-07-23 12:53
oauth2client-1.2/uritemplate/__init__.py
tar xf oauth2client-1.2.tar.gz
find oauth2client-1.2 -type f | xargs grep uritemplate
oauth2client-1.2/oauth2client/gce.py:import uritemplate
oauth2client-1.2/oauth2client/gce.py: uri = uritemplate.expand(META,
{'scope': self.scope})
oauth2client-1.2/oauth2client.egg-info/SOURCES.txt:uritemplate/__init__.py
oauth2client-1.2/oauth2client.egg-info/top_level.txt:uritemplate
oauth2client-1.2/setup.py: 'uritemplate',
The fix for fink turned out to be not too complicated. But I am likely to run
into trouble on gce with uritemplate clashes when I use virtualenv to setup my
app.
PatchScript: <<
rm oauth2client/gce.py
rm -rf uritemplate
perl -pi -e "s/'uritemplate',//" setup.py
perl -ni -e "print unless /gce/" oauth2client.egg-info/SOURCES.txt
perl -ni -e "print unless /uritemplate/" oauth2client.egg-info/SOURCES.txt
<<
# Then proceed with the normal install process...
Original comment by schw...@gmail.com
on 24 Nov 2013 at 7:40
OK, the oauth2client tar.gz shouldn't have uritemplate included, it should just
have that listed as an external dependency, which is a legitimate bug that
appears to happen when the .tar.gz is built. I'll look into that, and thanks
for taking the time to explain the issue.
Original comment by jcgregorio@google.com
on 24 Nov 2013 at 7:52
Thanks! -kurt
Original comment by schw...@gmail.com
on 25 Nov 2013 at 3:38
Original issue reported on code.google.com by
schw...@gmail.com
on 24 Nov 2013 at 6:29