Re: Port version difficulties (maybe one for the Python crowd)

2009-12-11 Thread Peter Pentchev
On Mon, Dec 07, 2009 at 05:12:03PM -0500, Greg Larkin wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Kevin Golding wrote:
> > In article <4b1d617a.6020...@freebsd.org>, Greg Larkin
> >  writes
> >> This might get you further:
> >>
> >> fbsd70# make -V \
> >> PYDISTUTILS_PKGVERSION:C/\(\[\[:digit:\]\]\.\[\[:digit:\]\]\)\./\\1_/g
> >> 0.1_0
> >> fbsd70#
> > 
> > Well that does indeed work in that context, but I have no idea why it
> > appears to do nothing in the Makefile.  It seems completely unchanged:
> > 
> > pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
> > /usr/local/lib/python2.6/site-packages django-signals-ahoy==0.1.0'
> > failed
> > 
> > I actually had to double check I did indeed update the correct file.  A
> > bit strange anyway.
> > 
> > Kevin
> 
> Hi Kevin,
> 
> There's a lot more backslash escaping required in the :C suffix above
> when running the make command directly in the shell.  If you remove some
> of the backslashes in the equivalent line in the Makefile, should be all
> set.  Then you can check to make it's working by running "make -V
> PYEASYINSTALL_UNINSTALLARGS".

A bit off-topic, and a bit late, but you can avoid the need for those
additional backslashes by simply placing the string in apostrophes
(single quotes).  It's the shell that tries to interpret the string
before passing it to "make" itself, and the single quotes tell
the shell to not even try to interpret the string.

So, just do:

  make -V 'PYDISTUTILS_PKGVERSION:C/([[:digit:]]\.[[:digit:]])\./\1_/g'

...and you'll see what make(1) thinks of the quoted string, just as if
you'd put it in the Makefile.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.netr...@space.bgr...@freebsd.org
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
.siht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI


pgpXa9EbTWuFM.pgp
Description: PGP signature


Re: Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Kevin Golding
In article <4b1d7db3.60...@freebsd.org>, Greg Larkin
 writes
>There's a lot more backslash escaping required in the :C suffix above
>when running the make command directly in the shell.  If you remove some
>of the backslashes in the equivalent line in the Makefile, should be all
>set.  Then you can check to make it's working by running "make -V
>PYEASYINSTALL_UNINSTALLARGS".

So there is, guess I'm getting sleepy.  It all seems to work, but I
should probably wait for the morning and test it more carefully when I'm
more awake before I get too cocky.  But! That part works which is much
appreciated.

Cheers,
Kevin
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kevin Golding wrote:
> In article <4b1d617a.6020...@freebsd.org>, Greg Larkin
>  writes
>> This might get you further:
>>
>> fbsd70# make -V \
>> PYDISTUTILS_PKGVERSION:C/\(\[\[:digit:\]\]\.\[\[:digit:\]\]\)\./\\1_/g
>> 0.1_0
>> fbsd70#
> 
> Well that does indeed work in that context, but I have no idea why it
> appears to do nothing in the Makefile.  It seems completely unchanged:
> 
> pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
> /usr/local/lib/python2.6/site-packages django-signals-ahoy==0.1.0'
> failed
> 
> I actually had to double check I did indeed update the correct file.  A
> bit strange anyway.
> 
> Kevin

Hi Kevin,

There's a lot more backslash escaping required in the :C suffix above
when running the make command directly in the shell.  If you remove some
of the backslashes in the equivalent line in the Makefile, should be all
set.  Then you can check to make it's working by running "make -V
PYEASYINSTALL_UNINSTALLARGS".

Cheers,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLHX2y0sRouByUApARAtlfAKCAAAG98WbUZimB3THbHkNfivB5bgCgw+kK
TMJOhrlCn7/zIbvvipYHSc4=
=v7JF
-END PGP SIGNATURE-

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Kevin Golding
In article <4b1d617a.6020...@freebsd.org>, Greg Larkin
 writes
>This might get you further:
>
>fbsd70# make -V \
>PYDISTUTILS_PKGVERSION:C/\(\[\[:digit:\]\]\.\[\[:digit:\]\]\)\./\\1_/g
>0.1_0
>fbsd70#

Well that does indeed work in that context, but I have no idea why it
appears to do nothing in the Makefile.  It seems completely unchanged:

pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
/usr/local/lib/python2.6/site-packages django-signals-ahoy==0.1.0'
failed

I actually had to double check I did indeed update the correct file.  A
bit strange anyway.

Kevin
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kevin Golding wrote:
> In article <4b1d516d.2060...@freebsd.org>, Greg Larkin
>  writes
>> Kevin Golding wrote:
>>> I'm trying to create a new port and I'm getting in a tangle with the
>>> version number.  Basically, the author of this software has given it a
>>> version number 0.1_0 which is incompatible with ports.  Never fear! I
>>> simply set the port version to 0.1.0 which is.  Now this wasn't too bad
>>> to deal with, I set "DISTNAME=  ${PORTNAME}-0.1-0" to make it fetch
>>> just fine (yes, despite the version being 0.1_0 the tarball is 0.1-0).
>>>
>>> Because of the version number I've also set:
>>>
>>> PYEASYINSTALL_EGG=  ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-0.1_
>>> 0-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg
>>>
>>> This makes installing work.
>>>
>>> Uninstalling fails with:
>>>
>>> pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
>>> /usr/local/lib/python2.6/site-packages  -d usr/local/lib/python2.6/site-
>>> packages  -s /usr/local/bin  django-signals-ahoy==0.1.0' failed
>>>
>>> So because ports installed 0.1.0 and the author wrote 0.1_0 is fails.
>>>
>>> I did look at setting PYEASYINSTALL_UNINSTALLARGS but I must confess my
>>> attempts to turn PYDISTUTILS_PKGVERSION into 0.1_0 have so far failed
>>> (as in, apparently my regex has changed nothing).
> 
>> I've run into problems similar to this from time to time while creating
>> and maintaining ports.  Would you mind posting a link to or the contents
>> of your Makefile so I can have a look at it?
> 
> With pleasure (the whole port is there in fact): 
> http://www.caomhin.org/ports/www/py-django-signals-ahoy/Makefile
> 
>> It's also useful to use "make -V " to examine the values
>> of any variable you're trying to debug, like PYDISTUTILS_PKGVERSION.  I
>> believe you can even use the colon modifiers (:S, :C, etc.) right on the
>> command line so you can try different regexps easily.
> 
> Ooh, now that sounds dangerously addictive.  I shall give it a whirl and
> shout if I crack it.
> 
> Kevin

Hi Kevin,

This might get you further:

fbsd70# make -V \
PYDISTUTILS_PKGVERSION:C/\(\[\[:digit:\]\]\.\[\[:digit:\]\]\)\./\\1_/g
0.1_0
fbsd70#

The :C modifier uses regexps as specified by re_format(7)
(http://bit.ly/8CH8X1) instead of Perl regexps.

Hope that helps,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLHWF60sRouByUApARAuwHAJ9u/h3DzSZ1cOqGzRu3Y2K9jSFpawCfegsc
p4QLS7fR3MNglymvWrsqh2M=
=83xv
-END PGP SIGNATURE-

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Kevin Golding
In article <4b1d516d.2060...@freebsd.org>, Greg Larkin
 writes
>Kevin Golding wrote:
>> I'm trying to create a new port and I'm getting in a tangle with the
>> version number.  Basically, the author of this software has given it a
>> version number 0.1_0 which is incompatible with ports.  Never fear! I
>> simply set the port version to 0.1.0 which is.  Now this wasn't too bad
>> to deal with, I set "DISTNAME=  ${PORTNAME}-0.1-0" to make it fetch
>> just fine (yes, despite the version being 0.1_0 the tarball is 0.1-0).
>> 
>> Because of the version number I've also set:
>> 
>> PYEASYINSTALL_EGG=  ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-0.1_
>> 0-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg
>> 
>> This makes installing work.
>> 
>> Uninstalling fails with:
>> 
>> pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
>> /usr/local/lib/python2.6/site-packages  -d usr/local/lib/python2.6/site-
>> packages  -s /usr/local/bin  django-signals-ahoy==0.1.0' failed
>> 
>> So because ports installed 0.1.0 and the author wrote 0.1_0 is fails.
>> 
>> I did look at setting PYEASYINSTALL_UNINSTALLARGS but I must confess my
>> attempts to turn PYDISTUTILS_PKGVERSION into 0.1_0 have so far failed
>> (as in, apparently my regex has changed nothing).

>I've run into problems similar to this from time to time while creating
>and maintaining ports.  Would you mind posting a link to or the contents
>of your Makefile so I can have a look at it?

With pleasure (the whole port is there in fact): 
http://www.caomhin.org/ports/www/py-django-signals-ahoy/Makefile

>It's also useful to use "make -V " to examine the values
>of any variable you're trying to debug, like PYDISTUTILS_PKGVERSION.  I
>believe you can even use the colon modifiers (:S, :C, etc.) right on the
>command line so you can try different regexps easily.

Ooh, now that sounds dangerously addictive.  I shall give it a whirl and
shout if I crack it.

Kevin
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kevin Golding wrote:
> I've had a bit of a poke around and no real joy in figuring this out so
> let's see just how obvious the thing I'm missing is.
> 
> I'm trying to create a new port and I'm getting in a tangle with the
> version number.  Basically, the author of this software has given it a
> version number 0.1_0 which is incompatible with ports.  Never fear! I
> simply set the port version to 0.1.0 which is.  Now this wasn't too bad
> to deal with, I set "DISTNAME=  ${PORTNAME}-0.1-0" to make it fetch
> just fine (yes, despite the version being 0.1_0 the tarball is 0.1-0).
> 
> All well and good at the early stages.  This is where it gets
> Pythonesque, and eventually problematic.
> 
> Because of the version number I've also set:
> 
> PYEASYINSTALL_EGG=  ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-0.1_
> 0-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg
> 
> This makes installing work.
> 
> Uninstalling fails with:
> 
> pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
> /usr/local/lib/python2.6/site-packages  -d usr/local/lib/python2.6/site-
> packages  -s /usr/local/bin  django-signals-ahoy==0.1.0' failed
> 
> So because ports installed 0.1.0 and the author wrote 0.1_0 is fails.
> 
> I did look at setting PYEASYINSTALL_UNINSTALLARGS but I must confess my
> attempts to turn PYDISTUTILS_PKGVERSION into 0.1_0 have so far failed
> (as in, apparently my regex has changed nothing).
> 
> Which brings me to my question (or questions).
> 
> a) Can anyone point me in the right direction for making the
> easy_install uninstall properly?
> 
> or
> 
> b) Should I simply change the version in the distfile so that is uses
> more standard syntax and I can just use 0.1.0 which will work without
> all the extras? 
> 
> TIA,
> Kevin

Hi Kevin,

I've run into problems similar to this from time to time while creating
and maintaining ports.  Would you mind posting a link to or the contents
of your Makefile so I can have a look at it?

It's also useful to use "make -V " to examine the values
of any variable you're trying to debug, like PYDISTUTILS_PKGVERSION.  I
believe you can even use the colon modifiers (:S, :C, etc.) right on the
command line so you can try different regexps easily.

Regards,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLHVFt0sRouByUApARAhtUAKCzUJDfqM8ahbpA+utA1hU5AUuzBwCfXqim
ifmETG+YraAIuc+/YValWUY=
=i0SW
-END PGP SIGNATURE-

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Port version difficulties (maybe one for the Python crowd)

2009-12-07 Thread Kevin Golding
I've had a bit of a poke around and no real joy in figuring this out so
let's see just how obvious the thing I'm missing is.

I'm trying to create a new port and I'm getting in a tangle with the
version number.  Basically, the author of this software has given it a
version number 0.1_0 which is incompatible with ports.  Never fear! I
simply set the port version to 0.1.0 which is.  Now this wasn't too bad
to deal with, I set "DISTNAME=  ${PORTNAME}-0.1-0" to make it fetch
just fine (yes, despite the version being 0.1_0 the tarball is 0.1-0).

All well and good at the early stages.  This is where it gets
Pythonesque, and eventually problematic.

Because of the version number I've also set:

PYEASYINSTALL_EGG=  ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-0.1_
0-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg

This makes installing work.

Uninstalling fails with:

pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
/usr/local/lib/python2.6/site-packages  -d usr/local/lib/python2.6/site-
packages  -s /usr/local/bin  django-signals-ahoy==0.1.0' failed

So because ports installed 0.1.0 and the author wrote 0.1_0 is fails.

I did look at setting PYEASYINSTALL_UNINSTALLARGS but I must confess my
attempts to turn PYDISTUTILS_PKGVERSION into 0.1_0 have so far failed
(as in, apparently my regex has changed nothing).

Which brings me to my question (or questions).

a) Can anyone point me in the right direction for making the
easy_install uninstall properly?

or

b) Should I simply change the version in the distfile so that is uses
more standard syntax and I can just use 0.1.0 which will work without
all the extras? 

TIA,
Kevin
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"