Re: [Fink-devel] Python installer

2016-05-01 Thread Hanspeter Niederstrasser
On 5/1/16 12:40 PM, Scott Hannahs wrote:
>
> PYTHONPATH="/sw/src/fink.build/root-pbr-py27-1.9.1-1/sw/lib/python2.7/site-packages:$PYTHONPATH"
>  /sw/bin/python2.7 setup.py test
> running test
> Searching for testtools>=1.4.0
> Reading https://pypi.python.org/simple/testtools/
> Download error on https://pypi.python.org/simple/testtools/: [SSL: 
> CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some 
> packages may not be found!
> Couldn't retrieve index page for u'testtools'
> Scanning index of all packages (this may take a while)
> Reading https://pypi.python.org/simple/
> Download error on https://pypi.python.org/simple/: [SSL: 
> CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some 
> packages may not be found!
> No local packages or download links found for testtools>=1.4.0
> error: Could not find suitable distribution for 
> Requirement.parse('testtools>=1.4.0')
> ### execution of /sw/bin/python2.7 failed, exit code 1
> ### execution of /tmp/fink.k4sNy failed, exit code 1
> phase test: warning

The build is looking for testtools >= 1.4.0  Fink's testtools is 
currently only 0.9.35.

I've CC'd the testtools maintainer so he can look at upgrading if it's 
possible.

Hanspeter


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Python installer

2016-05-01 Thread Scott Hannahs

> On Apr 30, 2016, at 9:18 PM, Alexander Hansen  
> wrote:
> 
> 
>> On Apr 30, 2016, at 15:42, Scott Hannahs  
>> wrote:
>> 
>> Unfortunately I maintain a python utility for fink.  But not being terribly 
>> up on the versioning issues with python I am having some problems with some 
>> utilities.  I would appreciate a bit of help from the collective wisdom.
>> 
>> I have set up  a couple of python libraries by copying another library I am 
>> updating.  But they each gives a different error.
>> 
>> pbr-py: gives the following
>> Validating .deb dir /sw/src/fink.build/root-pbr-py27-1.9.1-1...
>> Error: File in a language-versioned package does not have a pathname 
>> specific to that version.
>>  Offending file: /sw/bin/pbr
>> 
>> pycryptopp gives the following:
>> Validating .deb dir /sw/src/fink.build/root-pycryptopp-py27-0.7.1-1...
>> Error: File in a language-versioned package does not have a pathname 
>> specific to that version.
>>  Offending file: /sw/share/doc/pycryptopp/COPYING.GPL
>>  Offending file: /sw/share/doc/pycryptopp/COPYING.MIT.txt
>>  Offending file: /sw/share/doc/pycryptopp/COPYING.SPL.txt
>>  Offending file: /sw/share/doc/pycryptopp/COPYING.TGPPL.rst
>>  Offending file: /sw/share/doc/pycryptopp/README.rst
>> 
>> As far as I can tell fink wants to version the utility in sw/bin and the 
>> documentation in /sw/share/doc
>> This is fine, but I don’t see the switch to tell fink or the install script 
>> to do special handling for the tools or the documentation.
>> 
>> Any suggestions of where to go for an example on how to handle this?  I find 
>> it odd, because fink automatically did this for the lockfile-py27 
>> installation that I used as a template.
>> For example on the pycryptopp library I use
>> InstallScript: %p/bin/python%type_raw[python] setup.py install --prefix=%p 
>> --root=%d
>> DocFiles: COPYING.GPL COPYING.MIT.txt COPYING.SPL.txt COPYING.TGPPL.rst 
>> MANIFEST.in NEWS.rst PKG-INFO README.ed25519.rst README.rst
>> 
>> -Scott
>> 
> 
> There’s no magic associated with Python builds.  Any necessary tweaks are 
> generally done manually.  Without seeing your .info files, it’s hard to say 
> what’s wrong, but here are some ideas to look at:
> 
> 1)  Your pbr package looks like an executable rather than a python module.  
> It’s often best not to use Type: python in executable packages, particularly 
> if they only use one Python version,  since that avoids triggering the 
> validator check for language versioning.
> 
> If you’re allowing for multiple python versions for an executable, then the 
> way to go is to rename the executable, e.g. to pbr-%type_raw[python] or 
> pbr-%type_pkg[python] and then to use update-alternatives to allow users to 
> select which one becomes “pbr”.   sci/pymol-py.info is an example of how to 
> do this for multiple versions.
> 
> 2)  For pytcryptopp, it looks like the documents somehow got installed in 
> %i/share/doc/%{Ni} rather than %i/share/doc/%N.  If we take lockfile-py27 as 
> an example its DocFiles get installed as follows:
> 
> /sw/share/doc/lockfile-py27/ACKS
> /sw/share/doc/lockfile-py27/doc
> /sw/share/doc/lockfile-py27/doc/source
> /sw/share/doc/lockfile-py27/doc/source/conf.py
> /sw/share/doc/lockfile-py27/doc/source/index.rst
> /sw/share/doc/lockfile-py27/doc/source/Makefile
> /sw/share/doc/lockfile-py27/LICENSE
> /sw/share/doc/lockfile-py27/PKG-INFO
> /sw/share/doc/lockfile-py27/README
> /sw/share/doc/lockfile-py27/RELEASE-NOTES
> -- 
> Alexander Hansen, Ph.D.
> Fink User Liaison

Alexander,
That was very helpful.  Thanks.  Now I am a few steps further.  When trying to 
get the package to pass the -m option it of course does the testing phase.  I 
get a warning and the package passes.  However the warning is that it skipped 
all tests!  When running "setup.py test” the script tries to download its own 
copy of testtools.  I have set it up to install the fink version as a 
TESTDEPENDS but the test routine goes back to trying to download its own copy 
form pypi which of course fails due to moving everything around on pypi for 
“security” reasons.

Do I need an environment variable to point python to the existing fink python 
modules?

sudo -u fink-bld [ENV] sh -c /tmp/fink.5xP2J
PYTHONPATH="/sw/src/fink.build/root-pbr-py27-1.9.1-1/sw/lib/python2.7/site-packages:$PYTHONPATH"
 /sw/bin/python2.7 setup.py test
running test
Searching for testtools>=1.4.0
Reading https://pypi.python.org/simple/testtools/
Download error on https://pypi.python.org/simple/testtools/: [SSL: 
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some 
packages may not be found!
Couldn't retrieve index page for u'testtools'
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: 
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some 
packages may 

Re: [Fink-devel] Python installer

2016-04-30 Thread Alexander Hansen

> On Apr 30, 2016, at 15:42, Scott Hannahs  
> wrote:
> 
> Unfortunately I maintain a python utility for fink.  But not being terribly 
> up on the versioning issues with python I am having some problems with some 
> utilities.  I would appreciate a bit of help from the collective wisdom.
> 
> I have set up  a couple of python libraries by copying another library I am 
> updating.  But they each gives a different error.
> 
> pbr-py: gives the following
> Validating .deb dir /sw/src/fink.build/root-pbr-py27-1.9.1-1...
> Error: File in a language-versioned package does not have a pathname specific 
> to that version.
>   Offending file: /sw/bin/pbr
> 
> pycryptopp gives the following:
> Validating .deb dir /sw/src/fink.build/root-pycryptopp-py27-0.7.1-1...
> Error: File in a language-versioned package does not have a pathname specific 
> to that version.
>   Offending file: /sw/share/doc/pycryptopp/COPYING.GPL
>   Offending file: /sw/share/doc/pycryptopp/COPYING.MIT.txt
>   Offending file: /sw/share/doc/pycryptopp/COPYING.SPL.txt
>   Offending file: /sw/share/doc/pycryptopp/COPYING.TGPPL.rst
>   Offending file: /sw/share/doc/pycryptopp/README.rst
> 
> As far as I can tell fink wants to version the utility in sw/bin and the 
> documentation in /sw/share/doc
> This is fine, but I don’t see the switch to tell fink or the install script 
> to do special handling for the tools or the documentation.
> 
> Any suggestions of where to go for an example on how to handle this?  I find 
> it odd, because fink automatically did this for the lockfile-py27 
> installation that I used as a template.
> For example on the pycryptopp library I use
> InstallScript: %p/bin/python%type_raw[python] setup.py install --prefix=%p 
> --root=%d
> DocFiles: COPYING.GPL COPYING.MIT.txt COPYING.SPL.txt COPYING.TGPPL.rst 
> MANIFEST.in NEWS.rst PKG-INFO README.ed25519.rst README.rst
> 
> -Scott
> 

There’s no magic associated with Python builds.  Any necessary tweaks are 
generally done manually.  Without seeing your .info files, it’s hard to say 
what’s wrong, but here are some ideas to look at:

1)  Your pbr package looks like an executable rather than a python module.  
It’s often best not to use Type: python in executable packages, particularly if 
they only use one Python version,  since that avoids triggering the validator 
check for language versioning.

If you’re allowing for multiple python versions for an executable, then the way 
to go is to rename the executable, e.g. to pbr-%type_raw[python] or 
pbr-%type_pkg[python] and then to use update-alternatives to allow users to 
select which one becomes “pbr”.   sci/pymol-py.info is an example of how to do 
this for multiple versions.

2)  For pytcryptopp, it looks like the documents somehow got installed in 
%i/share/doc/%{Ni} rather than %i/share/doc/%N.  If we take lockfile-py27 as an 
example its DocFiles get installed as follows:

/sw/share/doc/lockfile-py27/ACKS
/sw/share/doc/lockfile-py27/doc
/sw/share/doc/lockfile-py27/doc/source
/sw/share/doc/lockfile-py27/doc/source/conf.py
/sw/share/doc/lockfile-py27/doc/source/index.rst
/sw/share/doc/lockfile-py27/doc/source/Makefile
/sw/share/doc/lockfile-py27/LICENSE
/sw/share/doc/lockfile-py27/PKG-INFO
/sw/share/doc/lockfile-py27/README
/sw/share/doc/lockfile-py27/RELEASE-NOTES




-- 
Alexander Hansen, Ph.D.
Fink User Liaison


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] Python installer

2016-04-30 Thread Scott Hannahs
Unfortunately I maintain a python utility for fink.  But not being terribly up 
on the versioning issues with python I am having some problems with some 
utilities.  I would appreciate a bit of help from the collective wisdom.

I have set up  a couple of python libraries by copying another library I am 
updating.  But they each gives a different error.

pbr-py: gives the following
Validating .deb dir /sw/src/fink.build/root-pbr-py27-1.9.1-1...
Error: File in a language-versioned package does not have a pathname specific 
to that version.
Offending file: /sw/bin/pbr

pycryptopp gives the following:
Validating .deb dir /sw/src/fink.build/root-pycryptopp-py27-0.7.1-1...
Error: File in a language-versioned package does not have a pathname specific 
to that version.
Offending file: /sw/share/doc/pycryptopp/COPYING.GPL
Offending file: /sw/share/doc/pycryptopp/COPYING.MIT.txt
Offending file: /sw/share/doc/pycryptopp/COPYING.SPL.txt
Offending file: /sw/share/doc/pycryptopp/COPYING.TGPPL.rst
Offending file: /sw/share/doc/pycryptopp/README.rst

As far as I can tell fink wants to version the utility in sw/bin and the 
documentation in /sw/share/doc
This is fine, but I don’t see the switch to tell fink or the install script to 
do special handling for the tools or the documentation.

Any suggestions of where to go for an example on how to handle this?  I find it 
odd, because fink automatically did this for the lockfile-py27 installation 
that I used as a template.
For example on the pycryptopp library I use
InstallScript: %p/bin/python%type_raw[python] setup.py install --prefix=%p 
--root=%d
DocFiles: COPYING.GPL COPYING.MIT.txt COPYING.SPL.txt COPYING.TGPPL.rst 
MANIFEST.in NEWS.rst PKG-INFO README.ed25519.rst README.rst

-Scott


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel