Re: [macports-ports] 01/06: pgcli: updates.

2017-01-20 Thread Ivan Larionov
Ok, sounds reasonable.

And doing `port install pgcli +postgresql96` without predefined variants works 
indeed.

https://github.com/macports/macports-ports/pull/171
https://github.com/macports/macports-ports/pull/172

Thanks.

--
With best regards, Ivan Larionov.

> On Jan 19, 2017, at 6:31 PM, Ryan Schmidt  wrote:
> 
> 
> 
>> On Jan 19, 2017, at 20:28, Ivan Larionov  wrote:
>> 
>>> On Thu, Jan 19, 2017 at 5:58 PM, Ryan Schmidt  
>>> wrote:
>>> 
 On Jan 19, 2017, at 17:29, Ivan Larionov  wrote:
 
 How do we control postgresql version for py-psycopg2 when installing pgcli 
 then? Is there a way to do something like this?
 
 if variant postgresql96 {
  depends_lib-append py{python.version}-psycopg2 +postgresql96
 }
>>> 
>>> You cannot declare a dependency on a variant. MacPorts does not contain 
>>> that functionality.
>>> 
>>> In what way does pgcli care what variant of pyXX-psycopg2 is installed?
> 
>> 
>> pgcli doesn't care, but, for example, user of postgresql96 don't want to 
>> install postgresql95 when installing pgcli just because default variant of 
>> py-psycopg2 is postgresql95.
> 
> Then that user should either put "+postgresql96" into their variants.conf or 
> should run "sudo port install pgcli +postgresql96" (the variant will 
> propagate to any uninstalled dependencies)
> 
> Also, the default variant of py-psycopg2 should be changed to +postgresql96 
> since that is the latest stable version.
> 



Re: [macports-ports] 01/06: pgcli: updates.

2017-01-19 Thread Ryan Schmidt


> On Jan 19, 2017, at 20:28, Ivan Larionov  wrote:
> 
>> On Thu, Jan 19, 2017 at 5:58 PM, Ryan Schmidt  
>> wrote:
>> 
>> > On Jan 19, 2017, at 17:29, Ivan Larionov  wrote:
>> >
>> > How do we control postgresql version for py-psycopg2 when installing pgcli 
>> > then? Is there a way to do something like this?
>> >
>> > if variant postgresql96 {
>> >   depends_lib-append py{python.version}-psycopg2 +postgresql96
>> > }
>> 
>> You cannot declare a dependency on a variant. MacPorts does not contain that 
>> functionality.
>> 
>> In what way does pgcli care what variant of pyXX-psycopg2 is installed?

> 
> pgcli doesn't care, but, for example, user of postgresql96 don't want to 
> install postgresql95 when installing pgcli just because default variant of 
> py-psycopg2 is postgresql95.

Then that user should either put "+postgresql96" into their variants.conf or 
should run "sudo port install pgcli +postgresql96" (the variant will propagate 
to any uninstalled dependencies)

Also, the default variant of py-psycopg2 should be changed to +postgresql96 
since that is the latest stable version.



Re: [macports-ports] 01/06: pgcli: updates.

2017-01-19 Thread Ivan Larionov
pgcli doesn't care, but, for example, user of postgresql96 don't want to
install postgresql95 when installing pgcli just because default variant of
py-psycopg2 is postgresql95.

On Thu, Jan 19, 2017 at 5:58 PM, Ryan Schmidt 
wrote:

>
> > On Jan 19, 2017, at 17:29, Ivan Larionov  wrote:
> >
> > How do we control postgresql version for py-psycopg2 when installing
> pgcli then? Is there a way to do something like this?
> >
> > if variant postgresql96 {
> >   depends_lib-append py{python.version}-psycopg2 +postgresql96
> > }
>
> You cannot declare a dependency on a variant. MacPorts does not contain
> that functionality.
>
> In what way does pgcli care what variant of pyXX-psycopg2 is installed?
>
>
>


-- 
With best regards, Ivan Larionov.


Re: [macports-ports] 01/06: pgcli: updates.

2017-01-19 Thread Ryan Schmidt

> On Jan 19, 2017, at 17:29, Ivan Larionov  wrote:
> 
> How do we control postgresql version for py-psycopg2 when installing pgcli 
> then? Is there a way to do something like this?
> 
> if variant postgresql96 {
>   depends_lib-append py{python.version}-psycopg2 +postgresql96
> }

You cannot declare a dependency on a variant. MacPorts does not contain that 
functionality.

In what way does pgcli care what variant of pyXX-psycopg2 is installed?




Re: [macports-ports] 01/06: pgcli: updates.

2017-01-19 Thread Ivan Larionov
How do we control postgresql version for py-psycopg2 when installing pgcli
then? Is there a way to do something like this?

if variant postgresql96 {
  depends_lib-append py{python.version}-psycopg2 +postgresql96
}

On Thu, Jan 19, 2017 at 6:39 AM, Aljaž Srebrnič  wrote:

> > On 17 gen 2017, at 19:09, Joshua Root  wrote:
> >
> > I guess you're aware that this doesn't actually do anything, and the
> variants only exist to encourage the user to specify one when installing?
>
> Yep, that was the intention.
>
> > The downsides:
> > * The situation where the user doesn't specify a variant is
> contradictory. pgcli will be installed with +postgresql96 but py-psycopg2
> will be installed with +postgresql95. Similarly when the user already has
> py-psycopg2 installed, the variant they specify when installing pgcli will
> have no actual effect.
> >
> > * Binary distribution now doesn't happen if the user asks for anything
> but +postgresql96, even though the installed files are identical.
>
> Hmm, those are actually very good points. I think we should remove the
> variants from pgcli altogether. What do you think, Ivan?
>
> --
> Aljaž Srebrnič a.k.a g5pw
> My public key:  https://g5pw.me/key
> Key fingerprint = 2109 8131 60CA 01AF 75EC  01BF E140 E1EE A54E E677
>
>


-- 
With best regards, Ivan Larionov.


Re: [macports-ports] 01/06: pgcli: updates.

2017-01-19 Thread Aljaž Srebrnič
> On 17 gen 2017, at 19:09, Joshua Root  wrote:
> 
> I guess you're aware that this doesn't actually do anything, and the variants 
> only exist to encourage the user to specify one when installing?

Yep, that was the intention.

> The downsides:
> * The situation where the user doesn't specify a variant is contradictory. 
> pgcli will be installed with +postgresql96 but py-psycopg2 will be installed 
> with +postgresql95. Similarly when the user already has py-psycopg2 
> installed, the variant they specify when installing pgcli will have no actual 
> effect.
> 
> * Binary distribution now doesn't happen if the user asks for anything but 
> +postgresql96, even though the installed files are identical.

Hmm, those are actually very good points. I think we should remove the variants 
from pgcli altogether. What do you think, Ivan?

--
Aljaž Srebrnič a.k.a g5pw
My public key:  https://g5pw.me/key
Key fingerprint = 2109 8131 60CA 01AF 75EC  01BF E140 E1EE A54E E677



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [macports-ports] 01/06: pgcli: updates.

2017-01-17 Thread Joshua Root

On 2017-1-17 20:53 , Aljaž Srebrnič wrote:

On 17 gen 2017, at 10:26, Ryan Schmidt  wrote:

The variants don't appear to do anything at all.


They’re there to propagate variant choice to a dependency, py-psycopg2.


I guess you're aware that this doesn't actually do anything, and the 
variants only exist to encourage the user to specify one when installing?


The downsides:
* The situation where the user doesn't specify a variant is 
contradictory. pgcli will be installed with +postgresql96 but 
py-psycopg2 will be installed with +postgresql95. Similarly when the 
user already has py-psycopg2 installed, the variant they specify when 
installing pgcli will have no actual effect.


* Binary distribution now doesn't happen if the user asks for anything 
but +postgresql96, even though the installed files are identical.


- Josh


Re: [macports-ports] 01/06: pgcli: updates.

2017-01-17 Thread Aljaž Srebrnič
> On 17 gen 2017, at 10:26, Ryan Schmidt  wrote:
> 
> The variants don't appear to do anything at all.

They’re there to propagate variant choice to a dependency, py-psycopg2.

--
Aljaž Srebrnič a.k.a g5pw
My public key:  https://g5pw.me/key
Key fingerprint = 2109 8131 60CA 01AF 75EC  01BF E140 E1EE A54E E677



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [macports-ports] 01/06: pgcli: updates.

2017-01-17 Thread Ryan Schmidt

> On Jan 16, 2017, at 05:06, Ivan Larionov  wrote:
> 
> Aljaž Srebrnič (g5pw) pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/7f01fddc58d6e8ccef250dc53685d29eabeb4df1
> 
> commit 7f01fddc58d6e8ccef250dc53685d29eabeb4df1
> 
> Author: Ivan Larionov 
> AuthorDate: Mon Jan 16 01:44:22 2017 -0800
> 
> 
> pgcli: updates.
> 
> 
> 
>   * add postgresql variants
> 

The variants don't appear to do anything at all.


>   * remove py-crypto dependency
> 
>   * add myself to maintainers
> 
> ---
>  databases/pgcli/Portfile | 44 ++--
>  1 file changed, 42 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/databases/pgcli/Portfile b/databases/pgcli/Portfile
> 
> index 5ad40b4..f794d17 100644
> 
> --- a/databases/pgcli/Portfile
> 
> +++ b/databases/pgcli/Portfile
> 
> @@ -7,7 +7,7 @@ PortGroup   github 1.0
> 
>  github.setupdbcli pgcli 1.4.0 v
>  
>  categories  databases python
> 
> -maintainers g5pw openmaintainer
> 
> +maintainers g5pw gmail.com:xeron.oskom openmaintainer
> 
>  license BSD
>  platforms   darwin
>  supported_archs noarch
> 
> @@ -35,10 +35,50 @@ if {[variant_isset python34]} {
> 
>  python.default_version 27
>  }
>  
> 
> +variant postgresql84 conflicts postgresql90 postgresql91 postgresql92 \
> 
> +postgresql93 postgresql94 postgresql95 postgresql96 \
> 
> +description "Build using postgresql v8.4" {}
> 
> +
> 
> +variant postgresql90 conflicts postgresql84 postgresql91 postgresql92 \
> 
> +postgresql93 postgresql94 postgresql95 postgresql96 \
> 
> +description "Build using postgresql v9.0" {}
> 
> +
> 
> +variant postgresql91 conflicts postgresql84 postgresql90 postgresql92 \
> 
> +postgresql93 postgresql94 postgresql95 postgresql96 \
> 
> +description "Build using postgresql v9.1" {}
> 
> +
> 
> +variant postgresql92 conflicts postgresql84 postgresql90 postgresql91 \
> 
> +postgresql93 postgresql94 postgresql95 postgresql96 \
> 
> +description "Build using postgresql v9.2" {}
> 
> +
> 
> +variant postgresql93 conflicts postgresql84 postgresql90 postgresql91 \
> 
> +postgresql92 postgresql94 postgresql95 postgresql96 \
> 
> +description "Build using postgresql v9.3" {}
> 
> +
> 
> +variant postgresql94 conflicts postgresql84 postgresql90 postgresql91 \
> 
> +postgresql92 postgresql93 postgresql95 postgresql96 \
> 
> +description "Build using postgresql v9.4" {}
> 
> +
> 
> +variant postgresql95 conflicts postgresql84 postgresql90 postgresql91 \
> 
> +postgresql92 postgresql93 postgresql94 postgresql96 \
> 
> +description "Build using postgresql v9.5" {}
> 
> +
> 
> +variant postgresql96 conflicts postgresql84 postgresql90 postgresql91 \
> 
> +postgresql92 postgresql93 postgresql94 postgresql95 \
> 
> +description "Build using postgresql v9.6" {}
> 
> +
> 
> +if {
> 
> +![variant_isset postgresql84] && ![variant_isset postgresql90] &&
> 
> +![variant_isset postgresql91] && ![variant_isset postgresql92] &&
> 
> +![variant_isset postgresql93] && ![variant_isset postgresql94] &&
> 
> +![variant_isset postgresql95] && ![variant_isset postgresql96]
> 
> +} {
> 
> +default_variants+postgresql96
> 
> +}
> 
> +
> 
>  depends_build   port:py${python.version}-setuptools
>  depends_lib-append  port:py${python.version}-click \
>  port:py${python.version}-configobj \
> 
> -port:py${python.version}-crypto \
> 
>  port:py${python.version}-humanize \
>  port:py${python.version}-pgspecial \
>  port:py${python.version}-prompt_toolkit \
> 
>