On Wed, Aug 20, 2014 at 8:23 AM, Andreas Jaeger <aj@suse.com> wrote:
On 08/20/2014 03:12 PM, Shaun McCance wrote:
> On Wed, 2014-08-20 at 12:37 +0200, Andreas Jaeger wrote:
>> Shaun, it is not working in a virtual environment. To reproduce:
>> * Install python virtualenv package
>> * Run "virtualenv its"
>> * Run "source its/bin/activate" to use the virtualenv
>> * Run now in the virtualenv "pip install itstool"
>>
>> It fails with:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> error: could not create '/usr/share/itstool': Permission denied
>>
>> ----------------------------------------
>> Cleaning up...
>> Command /tmp/its/bin/python -c "import
>> setuptools;__file__='/tmp/itstools/build/itstool/setup.py';exec(compile(open(__file__).read().replace('\r\n',
>> '\n'), __file__, 'exec'))" install --record
>> /tmp/pip-M39Dm9-record/install-record.txt
>> --single-version-externally-managed --install-headers
>> /tmp/itstools/include/site/python2.7 failed with error code 1 in
>> /tmp/its/build/itstool
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> I suggest to not use '/usr/share/itstool/its' in setup.py. Changing this
>> to 'itstool/its' fixed it for me.
>
> It scares me a bit to have different versions of the same package
> putting files in different places (pypi package vs upstream tarball).
> But that's probably live-with-able.

If you do this correctly, it will install them the same way! The
difference is installing system wide to /usr/share and installing
locally in a virtual environment. datadir will be set properly if you do
not hardcare /usr/share

>> But then it failed with a missing dependency on libxml2. It would be
>> great if the tool could live without the dependency and use lxml
>> instead, otherwise it needs to be setup using site-packages
>> (--system-site-packages)
>
> But this is a complete non-starter. itstool does rather intricate things
> with XML. It's quite a bit more than parse-and-forget. To change it to
> use lxml would require a complete rewrite, and I'm not even sure it can
> be done. Most XML libraries don't let you shoot yourself in the foot as
> easily as libxml2 does.

Both python-libxml2 and xml use libxml2 - just two different ways.

But if rewriting is too hard, then let's not change it for now. It's not
a ship-stopper.


>> We cannot move forward unless itstool can be executed in a virtual
>> environment (using site packages is possible but not desired).
>>
>> Shaun, could you take care of uploading a fixed package, please?
>
> It's unfortunate the servers don't just have >=2.0.1. It's been out for
> a while now. This isn't high on my list right now, and it's too late in
> the release cycle to switch anyway. I'll get back to it after Juno.

Since this only affects manuals, we can do it any time, the change
itself is not that huge and would not block us. If you don't have time
right now, this is another issue...


I think it's okay to press pause on this project as we hadn't planned for it in this release. 

Plus, until the source is tagged appropriately, we don't see the benefit from the tool update. 

So I'd like to continue to keep this in a holding pattern. 

Thanks,
Anne
 

Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

_______________________________________________
Openstack-docs mailing list
Openstack-docs@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs