Re: pip executable expected as part of plugin install.

2017-12-12 Thread Vaishnavi K . R
Hi,


In ARIA, the pip executable path is used to get the output of the 'pip freeze' 
command. This lists the installed packages in the local system. This list is 
written to a file and passed as a constraint to the 'pip install' command used 
by wagon.


At times, the installation directory changes and so the pip executable path. 
This creates problem in our systems and we need to handle the installation of 
pip exclusively. So it would be good to use the pip library instead of the 
executable path.


I tried using the pip library inplace of the 'pip executable path' to get the 
list of installed packages. The pip library for freeze does not return anything 
but rather prints the output to the 'stdout'. So the stdout needs to be 
redirected and stored in a variable.


Is redirecting stdout recommended?


With my current understanding on the utilities provided by pip, this is the 
available option to use the pip library instead of the pip executable.


Thanks,

/Vaish


From: Vaishnavi K.R <vaishnavi@ericsson.com>
Sent: Friday, December 8, 2017 11:47:21 AM
To: dev@ariatosca.incubator.apache.org
Subject: Re: pip executable expected as part of plugin install.

Hi,


There is no change with regards to this in the latest code base.

The following is the error that we get when the pip executable is not found.


Validating plugin /root/testplugin-1.0-py27-none-any.wgn...

Plugin validated successfully

Installing plugin /root/testplugin-1.0-py27-none-any.wgn...

Retrieving source...

Extracting zip /root/testplugin-1.0-py27-none-any.wgn to /tmp/tmp3Q0BL2...

Source is: /tmp/tmp3Q0BL2/testplugin

[Errno 2] No such file or directory



Thanks,

/Vaish


From: Thomas Nadeau <tnad...@apache.org>
Sent: Sunday, December 3, 2017 2:57:22 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: pip executable expected as part of plugin install.

DJ,

If when you take a look at this, you find that it fails, please send
detailed log/output
so we can figure this out.  I don’t see any of that from the thread below.

Thx,

—Tom


On Sun, Dec 3, 2017 at 11:22 AM, Tal Liron <t...@cloudify.co> wrote:

> Hi DJ,
>
> A lot has changed since August. :) I wonder if you can take a look at the
> current state of master and see if things have improved with wagon
> installs?
>
> On Fri, Dec 1, 2017 at 9:22 AM, D Jayachandran <
> d.jayachand...@ericsson.com>
> wrote:
>
> > Hi Ran,
> >
> > Sorry I had missed to answer this thread. Just to answer your question
> > wagon also expects pip as a binary "/usr/bin/pip".  The above path may
> not
> > be the same for al distros of linux and when the path varies we run into
> > the issue/
> > As I already told we could probably fix this issue by using pip as
> library
> > instead of a 3PP.
> > Please let me know if we can also apply the same fix with wagon as well.
> >
> > Regards,
> > DJ
> > -Original Message-
> > From: Ran Ziv [mailto:r...@cloudify.co]
> > Sent: Sunday, August 20, 2017 12:40 PM
> > To: dev@ariatosca.incubator.apache.org
> > Subject: Re: pip executable expected as part of plugin install.
> >
> > Can you try to explain again what's the issue you're seeing with the way
> > Wagon works right now?
> > We could create a pull request for Wagon as well, but I'm not sure I
> > understand the problem at the moment.
> >
> > On Wed, Aug 16, 2017 at 6:04 PM, D Jayachandran <
> > d.jayachand...@ericsson.com
> > > wrote:
> >
> > > Even if we fix the issue in ARIA. Wagon library still uses the same
> > > logic in finding the pip path and it is wrong.
> > > Am not sure how to fix this with wagon.
> > >
> > > Regards,
> > > DJ
> > > -Original Message-
> > > From: D Jayachandran [mailto:d.jayachand...@ericsson.com]
> > > Sent: Thursday, August 03, 2017 5:00 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: RE: pip executable expected as part of plugin install.
> > >
> > > Thanks Avia, I will open an issue.
> > >
> > > Regards,
> > > DJ
> > >
> > > -Original Message-
> > > From: Avia Efrat [mailto:a...@cloudify.co]
> > > Sent: Thursday, August 03, 2017 4:01 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: Re: pip executable expected as part of plugin install.
> > >
> > > Hi DJ,
> > > It seems you are correct, I don't see a reason for not using the pip
> > > library.
> > > Maybe it was that way since we didn't want to add pip as a dependency
> > > explicitly (this code is from the beginning of ARIA).

Re: pip executable expected as part of plugin install.

2017-12-07 Thread Vaishnavi K . R
Hi,


There is no change with regards to this in the latest code base.

The following is the error that we get when the pip executable is not found.


Validating plugin /root/testplugin-1.0-py27-none-any.wgn...

Plugin validated successfully

Installing plugin /root/testplugin-1.0-py27-none-any.wgn...

Retrieving source...

Extracting zip /root/testplugin-1.0-py27-none-any.wgn to /tmp/tmp3Q0BL2...

Source is: /tmp/tmp3Q0BL2/testplugin

[Errno 2] No such file or directory



Thanks,

/Vaish


From: Thomas Nadeau <tnad...@apache.org>
Sent: Sunday, December 3, 2017 2:57:22 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: pip executable expected as part of plugin install.

DJ,

If when you take a look at this, you find that it fails, please send
detailed log/output
so we can figure this out.  I don’t see any of that from the thread below.

Thx,

—Tom


On Sun, Dec 3, 2017 at 11:22 AM, Tal Liron <t...@cloudify.co> wrote:

> Hi DJ,
>
> A lot has changed since August. :) I wonder if you can take a look at the
> current state of master and see if things have improved with wagon
> installs?
>
> On Fri, Dec 1, 2017 at 9:22 AM, D Jayachandran <
> d.jayachand...@ericsson.com>
> wrote:
>
> > Hi Ran,
> >
> > Sorry I had missed to answer this thread. Just to answer your question
> > wagon also expects pip as a binary "/usr/bin/pip".  The above path may
> not
> > be the same for al distros of linux and when the path varies we run into
> > the issue/
> > As I already told we could probably fix this issue by using pip as
> library
> > instead of a 3PP.
> > Please let me know if we can also apply the same fix with wagon as well.
> >
> > Regards,
> > DJ
> > -Original Message-
> > From: Ran Ziv [mailto:r...@cloudify.co]
> > Sent: Sunday, August 20, 2017 12:40 PM
> > To: dev@ariatosca.incubator.apache.org
> > Subject: Re: pip executable expected as part of plugin install.
> >
> > Can you try to explain again what's the issue you're seeing with the way
> > Wagon works right now?
> > We could create a pull request for Wagon as well, but I'm not sure I
> > understand the problem at the moment.
> >
> > On Wed, Aug 16, 2017 at 6:04 PM, D Jayachandran <
> > d.jayachand...@ericsson.com
> > > wrote:
> >
> > > Even if we fix the issue in ARIA. Wagon library still uses the same
> > > logic in finding the pip path and it is wrong.
> > > Am not sure how to fix this with wagon.
> > >
> > > Regards,
> > > DJ
> > > -Original Message-
> > > From: D Jayachandran [mailto:d.jayachand...@ericsson.com]
> > > Sent: Thursday, August 03, 2017 5:00 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: RE: pip executable expected as part of plugin install.
> > >
> > > Thanks Avia, I will open an issue.
> > >
> > > Regards,
> > > DJ
> > >
> > > -Original Message-
> > > From: Avia Efrat [mailto:a...@cloudify.co]
> > > Sent: Thursday, August 03, 2017 4:01 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: Re: pip executable expected as part of plugin install.
> > >
> > > Hi DJ,
> > > It seems you are correct, I don't see a reason for not using the pip
> > > library.
> > > Maybe it was that way since we didn't want to add pip as a dependency
> > > explicitly (this code is from the beginning of ARIA).
> > >
> > > Feel free to open an issue about that =)
> > >
> > > On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <
> > > d.jayachand...@ericsson.com
> > > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Am using a Ubuntu version of linux for my development and ARIA does
> > > > not find the correct path of pip during the plugin install.
> > > > To be precise this happens when pip freeze is executed.
> > > >
> > > > @staticmethod
> > > > def _pip_freeze():
> > > > """Run pip freeze in current environment and return the
> > output"""
> > > > bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> > > > pip_path = os.path.join(sys.prefix, bin_dir,
> > > > 'pip{0}'.format('.exe' if os.name ==
> > > 'nt'
> > > > else ''))
> > > > pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> > > > stdout=subprocess.PIPE)
> > > > pip_freeze_output, _ = pip_freeze.communicate()
> > > > assert not pip_freeze.poll()
> > > > return pip_freeze_output
> > > >
> > > > Now the question is why are we executing a pip command directly and
> > > > not using pip as a library.
> > > >
> > > >
> > > > Regards,
> > > > DJ
> > > >
> > >
> >
>


Re: pip executable expected as part of plugin install.

2017-12-03 Thread Thomas Nadeau
 DJ,

If when you take a look at this, you find that it fails, please send
detailed log/output
so we can figure this out.  I don’t see any of that from the thread below.

Thx,

—Tom


On Sun, Dec 3, 2017 at 11:22 AM, Tal Liron <t...@cloudify.co> wrote:

> Hi DJ,
>
> A lot has changed since August. :) I wonder if you can take a look at the
> current state of master and see if things have improved with wagon
> installs?
>
> On Fri, Dec 1, 2017 at 9:22 AM, D Jayachandran <
> d.jayachand...@ericsson.com>
> wrote:
>
> > Hi Ran,
> >
> > Sorry I had missed to answer this thread. Just to answer your question
> > wagon also expects pip as a binary "/usr/bin/pip".  The above path may
> not
> > be the same for al distros of linux and when the path varies we run into
> > the issue/
> > As I already told we could probably fix this issue by using pip as
> library
> > instead of a 3PP.
> > Please let me know if we can also apply the same fix with wagon as well.
> >
> > Regards,
> > DJ
> > -Original Message-
> > From: Ran Ziv [mailto:r...@cloudify.co]
> > Sent: Sunday, August 20, 2017 12:40 PM
> > To: dev@ariatosca.incubator.apache.org
> > Subject: Re: pip executable expected as part of plugin install.
> >
> > Can you try to explain again what's the issue you're seeing with the way
> > Wagon works right now?
> > We could create a pull request for Wagon as well, but I'm not sure I
> > understand the problem at the moment.
> >
> > On Wed, Aug 16, 2017 at 6:04 PM, D Jayachandran <
> > d.jayachand...@ericsson.com
> > > wrote:
> >
> > > Even if we fix the issue in ARIA. Wagon library still uses the same
> > > logic in finding the pip path and it is wrong.
> > > Am not sure how to fix this with wagon.
> > >
> > > Regards,
> > > DJ
> > > -Original Message-
> > > From: D Jayachandran [mailto:d.jayachand...@ericsson.com]
> > > Sent: Thursday, August 03, 2017 5:00 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: RE: pip executable expected as part of plugin install.
> > >
> > > Thanks Avia, I will open an issue.
> > >
> > > Regards,
> > > DJ
> > >
> > > -Original Message-
> > > From: Avia Efrat [mailto:a...@cloudify.co]
> > > Sent: Thursday, August 03, 2017 4:01 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: Re: pip executable expected as part of plugin install.
> > >
> > > Hi DJ,
> > > It seems you are correct, I don't see a reason for not using the pip
> > > library.
> > > Maybe it was that way since we didn't want to add pip as a dependency
> > > explicitly (this code is from the beginning of ARIA).
> > >
> > > Feel free to open an issue about that =)
> > >
> > > On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <
> > > d.jayachand...@ericsson.com
> > > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Am using a Ubuntu version of linux for my development and ARIA does
> > > > not find the correct path of pip during the plugin install.
> > > > To be precise this happens when pip freeze is executed.
> > > >
> > > > @staticmethod
> > > > def _pip_freeze():
> > > > """Run pip freeze in current environment and return the
> > output"""
> > > > bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> > > > pip_path = os.path.join(sys.prefix, bin_dir,
> > > > 'pip{0}'.format('.exe' if os.name ==
> > > 'nt'
> > > > else ''))
> > > > pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> > > > stdout=subprocess.PIPE)
> > > > pip_freeze_output, _ = pip_freeze.communicate()
> > > > assert not pip_freeze.poll()
> > > > return pip_freeze_output
> > > >
> > > > Now the question is why are we executing a pip command directly and
> > > > not using pip as a library.
> > > >
> > > >
> > > > Regards,
> > > > DJ
> > > >
> > >
> >
>


Re: pip executable expected as part of plugin install.

2017-12-03 Thread Tal Liron
Hi DJ,

A lot has changed since August. :) I wonder if you can take a look at the
current state of master and see if things have improved with wagon installs?

On Fri, Dec 1, 2017 at 9:22 AM, D Jayachandran <d.jayachand...@ericsson.com>
wrote:

> Hi Ran,
>
> Sorry I had missed to answer this thread. Just to answer your question
> wagon also expects pip as a binary "/usr/bin/pip".  The above path may not
> be the same for al distros of linux and when the path varies we run into
> the issue/
> As I already told we could probably fix this issue by using pip as library
> instead of a 3PP.
> Please let me know if we can also apply the same fix with wagon as well.
>
> Regards,
> DJ
> -Original Message-
> From: Ran Ziv [mailto:r...@cloudify.co]
> Sent: Sunday, August 20, 2017 12:40 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: pip executable expected as part of plugin install.
>
> Can you try to explain again what's the issue you're seeing with the way
> Wagon works right now?
> We could create a pull request for Wagon as well, but I'm not sure I
> understand the problem at the moment.
>
> On Wed, Aug 16, 2017 at 6:04 PM, D Jayachandran <
> d.jayachand...@ericsson.com
> > wrote:
>
> > Even if we fix the issue in ARIA. Wagon library still uses the same
> > logic in finding the pip path and it is wrong.
> > Am not sure how to fix this with wagon.
> >
> > Regards,
> > DJ
> > -Original Message-
> > From: D Jayachandran [mailto:d.jayachand...@ericsson.com]
> > Sent: Thursday, August 03, 2017 5:00 PM
> > To: dev@ariatosca.incubator.apache.org
> > Subject: RE: pip executable expected as part of plugin install.
> >
> > Thanks Avia, I will open an issue.
> >
> > Regards,
> > DJ
> >
> > -----Original Message-
> > From: Avia Efrat [mailto:a...@cloudify.co]
> > Sent: Thursday, August 03, 2017 4:01 PM
> > To: dev@ariatosca.incubator.apache.org
> > Subject: Re: pip executable expected as part of plugin install.
> >
> > Hi DJ,
> > It seems you are correct, I don't see a reason for not using the pip
> > library.
> > Maybe it was that way since we didn't want to add pip as a dependency
> > explicitly (this code is from the beginning of ARIA).
> >
> > Feel free to open an issue about that =)
> >
> > On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <
> > d.jayachand...@ericsson.com
> > > wrote:
> >
> > > Hi,
> > >
> > > Am using a Ubuntu version of linux for my development and ARIA does
> > > not find the correct path of pip during the plugin install.
> > > To be precise this happens when pip freeze is executed.
> > >
> > > @staticmethod
> > > def _pip_freeze():
> > > """Run pip freeze in current environment and return the
> output"""
> > > bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> > > pip_path = os.path.join(sys.prefix, bin_dir,
> > > 'pip{0}'.format('.exe' if os.name ==
> > 'nt'
> > > else ''))
> > > pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> > > stdout=subprocess.PIPE)
> > > pip_freeze_output, _ = pip_freeze.communicate()
> > > assert not pip_freeze.poll()
> > > return pip_freeze_output
> > >
> > > Now the question is why are we executing a pip command directly and
> > > not using pip as a library.
> > >
> > >
> > > Regards,
> > > DJ
> > >
> >
>


RE: pip executable expected as part of plugin install.

2017-11-30 Thread D Jayachandran
Hi Ran,

Sorry I had missed to answer this thread. Just to answer your question wagon 
also expects pip as a binary "/usr/bin/pip".  The above path may not be the 
same for al distros of linux and when the path varies we run into the issue/
As I already told we could probably fix this issue by using pip as library 
instead of a 3PP. 
Please let me know if we can also apply the same fix with wagon as well.

Regards,
DJ
-Original Message-
From: Ran Ziv [mailto:r...@cloudify.co] 
Sent: Sunday, August 20, 2017 12:40 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: pip executable expected as part of plugin install.

Can you try to explain again what's the issue you're seeing with the way Wagon 
works right now?
We could create a pull request for Wagon as well, but I'm not sure I understand 
the problem at the moment.

On Wed, Aug 16, 2017 at 6:04 PM, D Jayachandran <d.jayachand...@ericsson.com
> wrote:

> Even if we fix the issue in ARIA. Wagon library still uses the same 
> logic in finding the pip path and it is wrong.
> Am not sure how to fix this with wagon.
>
> Regards,
> DJ
> -Original Message-
> From: D Jayachandran [mailto:d.jayachand...@ericsson.com]
> Sent: Thursday, August 03, 2017 5:00 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: RE: pip executable expected as part of plugin install.
>
> Thanks Avia, I will open an issue.
>
> Regards,
> DJ
>
> -Original Message-
> From: Avia Efrat [mailto:a...@cloudify.co]
> Sent: Thursday, August 03, 2017 4:01 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: pip executable expected as part of plugin install.
>
> Hi DJ,
> It seems you are correct, I don't see a reason for not using the pip 
> library.
> Maybe it was that way since we didn't want to add pip as a dependency 
> explicitly (this code is from the beginning of ARIA).
>
> Feel free to open an issue about that =)
>
> On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran < 
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi,
> >
> > Am using a Ubuntu version of linux for my development and ARIA does 
> > not find the correct path of pip during the plugin install.
> > To be precise this happens when pip freeze is executed.
> >
> > @staticmethod
> > def _pip_freeze():
> > """Run pip freeze in current environment and return the output"""
> > bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> > pip_path = os.path.join(sys.prefix, bin_dir,
> > 'pip{0}'.format('.exe' if os.name ==
> 'nt'
> > else ''))
> > pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> > stdout=subprocess.PIPE)
> > pip_freeze_output, _ = pip_freeze.communicate()
> > assert not pip_freeze.poll()
> > return pip_freeze_output
> >
> > Now the question is why are we executing a pip command directly and 
> > not using pip as a library.
> >
> >
> > Regards,
> > DJ
> >
>


Re: pip executable expected as part of plugin install.

2017-08-20 Thread Ran Ziv
Can you try to explain again what's the issue you're seeing with the way
Wagon works right now?
We could create a pull request for Wagon as well, but I'm not sure I
understand the problem at the moment.

On Wed, Aug 16, 2017 at 6:04 PM, D Jayachandran <d.jayachand...@ericsson.com
> wrote:

> Even if we fix the issue in ARIA. Wagon library still uses the same logic
> in finding the pip path and it is wrong.
> Am not sure how to fix this with wagon.
>
> Regards,
> DJ
> -Original Message-
> From: D Jayachandran [mailto:d.jayachand...@ericsson.com]
> Sent: Thursday, August 03, 2017 5:00 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: RE: pip executable expected as part of plugin install.
>
> Thanks Avia, I will open an issue.
>
> Regards,
> DJ
>
> -Original Message-
> From: Avia Efrat [mailto:a...@cloudify.co]
> Sent: Thursday, August 03, 2017 4:01 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: pip executable expected as part of plugin install.
>
> Hi DJ,
> It seems you are correct, I don't see a reason for not using the pip
> library.
> Maybe it was that way since we didn't want to add pip as a dependency
> explicitly (this code is from the beginning of ARIA).
>
> Feel free to open an issue about that =)
>
> On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi,
> >
> > Am using a Ubuntu version of linux for my development and ARIA does
> > not find the correct path of pip during the plugin install.
> > To be precise this happens when pip freeze is executed.
> >
> > @staticmethod
> > def _pip_freeze():
> > """Run pip freeze in current environment and return the output"""
> > bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> > pip_path = os.path.join(sys.prefix, bin_dir,
> > 'pip{0}'.format('.exe' if os.name ==
> 'nt'
> > else ''))
> > pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> > stdout=subprocess.PIPE)
> > pip_freeze_output, _ = pip_freeze.communicate()
> > assert not pip_freeze.poll()
> > return pip_freeze_output
> >
> > Now the question is why are we executing a pip command directly and
> > not using pip as a library.
> >
> >
> > Regards,
> > DJ
> >
>


RE: pip executable expected as part of plugin install.

2017-08-16 Thread D Jayachandran
Even if we fix the issue in ARIA. Wagon library still uses the same logic in 
finding the pip path and it is wrong. 
Am not sure how to fix this with wagon.

Regards,
DJ
-Original Message-
From: D Jayachandran [mailto:d.jayachand...@ericsson.com] 
Sent: Thursday, August 03, 2017 5:00 PM
To: dev@ariatosca.incubator.apache.org
Subject: RE: pip executable expected as part of plugin install.

Thanks Avia, I will open an issue.

Regards,
DJ

-Original Message-
From: Avia Efrat [mailto:a...@cloudify.co]
Sent: Thursday, August 03, 2017 4:01 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: pip executable expected as part of plugin install.

Hi DJ,
It seems you are correct, I don't see a reason for not using the pip library.
Maybe it was that way since we didn't want to add pip as a dependency 
explicitly (this code is from the beginning of ARIA).

Feel free to open an issue about that =)

On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <d.jayachand...@ericsson.com
> wrote:

> Hi,
>
> Am using a Ubuntu version of linux for my development and ARIA does 
> not find the correct path of pip during the plugin install.
> To be precise this happens when pip freeze is executed.
>
> @staticmethod
> def _pip_freeze():
> """Run pip freeze in current environment and return the output"""
> bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> pip_path = os.path.join(sys.prefix, bin_dir,
> 'pip{0}'.format('.exe' if os.name == 'nt'
> else ''))
> pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> stdout=subprocess.PIPE)
> pip_freeze_output, _ = pip_freeze.communicate()
> assert not pip_freeze.poll()
> return pip_freeze_output
>
> Now the question is why are we executing a pip command directly and 
> not using pip as a library.
>
>
> Regards,
> DJ
>


RE: pip executable expected as part of plugin install.

2017-08-03 Thread D Jayachandran
Thanks Avia, I will open an issue.

Regards,
DJ

-Original Message-
From: Avia Efrat [mailto:a...@cloudify.co] 
Sent: Thursday, August 03, 2017 4:01 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: pip executable expected as part of plugin install.

Hi DJ,
It seems you are correct, I don't see a reason for not using the pip library.
Maybe it was that way since we didn't want to add pip as a dependency 
explicitly (this code is from the beginning of ARIA).

Feel free to open an issue about that =)

On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <d.jayachand...@ericsson.com
> wrote:

> Hi,
>
> Am using a Ubuntu version of linux for my development and ARIA does 
> not find the correct path of pip during the plugin install.
> To be precise this happens when pip freeze is executed.
>
> @staticmethod
> def _pip_freeze():
> """Run pip freeze in current environment and return the output"""
> bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> pip_path = os.path.join(sys.prefix, bin_dir,
> 'pip{0}'.format('.exe' if os.name == 'nt'
> else ''))
> pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> stdout=subprocess.PIPE)
> pip_freeze_output, _ = pip_freeze.communicate()
> assert not pip_freeze.poll()
> return pip_freeze_output
>
> Now the question is why are we executing a pip command directly and 
> not using pip as a library.
>
>
> Regards,
> DJ
>


Re: pip executable expected as part of plugin install.

2017-08-03 Thread Avia Efrat
Hi DJ,
It seems you are correct, I don't see a reason for not using the pip
library.
Maybe it was that way since we didn't want to add pip as a dependency
explicitly (this code is from the beginning of ARIA).

Feel free to open an issue about that =)

On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran  wrote:

> Hi,
>
> Am using a Ubuntu version of linux for my development and ARIA does not
> find the correct path of pip during the plugin install.
> To be precise this happens when pip freeze is executed.
>
> @staticmethod
> def _pip_freeze():
> """Run pip freeze in current environment and return the output"""
> bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
> pip_path = os.path.join(sys.prefix, bin_dir,
> 'pip{0}'.format('.exe' if os.name == 'nt'
> else ''))
> pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> stdout=subprocess.PIPE)
> pip_freeze_output, _ = pip_freeze.communicate()
> assert not pip_freeze.poll()
> return pip_freeze_output
>
> Now the question is why are we executing a pip command directly and not
> using pip as a library.
>
>
> Regards,
> DJ
>


pip executable expected as part of plugin install.

2017-08-02 Thread D Jayachandran
Hi,

Am using a Ubuntu version of linux for my development and ARIA does not find 
the correct path of pip during the plugin install.
To be precise this happens when pip freeze is executed.

@staticmethod
def _pip_freeze():
"""Run pip freeze in current environment and return the output"""
bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
pip_path = os.path.join(sys.prefix, bin_dir,
'pip{0}'.format('.exe' if os.name == 'nt' else 
''))
pip_freeze = subprocess.Popen([pip_path, 'freeze'], 
stdout=subprocess.PIPE)
pip_freeze_output, _ = pip_freeze.communicate()
assert not pip_freeze.poll()
return pip_freeze_output

Now the question is why are we executing a pip command directly and not using 
pip as a library.


Regards,
DJ