[Bug 168159] Mk/bsd.python.mk: CMake python detection gets confused if multiple python versions are installed

2015-06-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168159

--- Comment #15 from commit-h...@freebsd.org ---
A commit references this bug:

Author: makc
Date: Wed Jun 10 09:23:54 UTC 2015
New revision: 389024
URL: https://svnweb.freebsd.org/changeset/ports/389024

Log:
  Pass the default Python version (or the version required by port)
  for CMake based ports.  By default CMake picks up the highest
  available version of Python package, therefore ports which use CMake
  may fail to build or link to different Python library than one could
  expect (e.g. bugs 199685, 200518).
  In essence this commit reverts r366996.

  PR:168159
  Exp-run by:antoine
  Approved by:mva

Changes:
  head/Mk/Uses/python.mk

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 168159] Mk/bsd.python.mk: CMake python detection gets confused if multiple python versions are installed

2015-06-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168159

Max Brazhnikov  changed:

   What|Removed |Added

 Status|Open|Closed
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 200518] games/golly: Force CMake to use python27 (and ignore python34)

2015-06-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200518
Bug 200518 depends on bug 168159, which changed state.

Bug 168159 Summary: Mk/bsd.python.mk: CMake python detection gets confused if 
multiple python versions are installed
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168159

   What|Removed |Added

 Status|Open|Closed
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


Python Subprocess Crontab Problem

2015-06-10 Thread Robert Simmons
I'm running into a wall with regards to using subprocess.call in a
python script running in a crontab. I have isolated this problem to be
subprocess not able to find the 7z executable. I have tried adding
PYTHONPATH=$PATH to crontab, I have tried adding shell=True to
subprocess.call, and I have tried using /usr/loca/bin/7z rather than
7z. None of these have fixed the problem. The error that I get is the
following:
/usr/local/bin/7z: realpath: not found
/usr/local/bin/7z: dirname: not found
exec: /../libexec/p7zip/7z: not found

Here is how I'm calling the script in crontab:
PATH=$PATH:/usr/local/bin
@every_minute   $HOME/test.py >> $HOME/test.error 2>&1


Here is the contents of my script (test.py):

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import subprocess
import tempfile

thing = 'blahblahblah'

errors = open('/home/myuser/error', 'wb')

with tempfile.TemporaryDirectory() as tmpdirname:
tempthing = os.path.join(tmpdirname, thing)
fh = open(tempthing, 'wb')
fh.write(b'123')
fh.close()
zipname = '{}.zip'.format(thing)
ziptempfile = os.path.join(tmpdirname, zipname)
zipper = subprocess.call(['7z', 'a', '-p{}'.format('something'),
'-tzip', '-y', ziptempfile, tempthing], stdout=errors,
stderr=subprocess.STDOUT)
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


Re: Python Subprocess Crontab Problem

2015-06-10 Thread Craig Rodrigues
On Wed, Jun 10

> Here is how I'm calling the script in crontab:
> PATH=$PATH:/usr/local/bin
>

I can't remember offhand, but I don't think you can do that.
I think you may need to fully specify the PATH instead of using $PATH.



> errors = open('/home/myuser/error', 'wb')
>
> with tempfile.TemporaryDirectory() as tmpdirname:
> tempthing = os.path.join(tmpdirname, thing)
> fh = open(tempthing, 'wb')
> fh.write(b'123')
> fh.close()
> zipname = '{}.zip'.format(thing)
> ziptempfile = os.path.join(tmpdirname, zipname)
>

Can you add right here:
   print("PATH: %s" % os.environ['PATH'], file=errors)

and see what the PATH is in your errors file?

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


Re: Python Subprocess Crontab Problem

2015-06-10 Thread Robert Simmons
On Wed, Jun 10, 2015 at 5:02 PM, Craig Rodrigues  wrote:
> Can you add right here:
>print("PATH: %s" % os.environ['PATH'], file=errors)
>
> and see what the PATH is in your errors file?

I should have mentioned that I'm using python3. The above is causing a
TypeError:
TypeError: 'str' does not support the buffer interface
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


Re: Re: Python Subprocess Crontab Problem

2015-06-10 Thread Chris Wojo
crontab isn't using a PATH for your specified user, so you need to give an 
absolute path.

 On Wed, 10 Jun 2015 14:02:06 -0700 Craig Rodrigues 
 wrote  

On Wed, Jun 10 
 
> Here is how I'm calling the script in crontab: 
> PATH=$PATH:/usr/local/bin 
> 
 
I can't remember offhand, but I don't think you can do that. 
I think you may need to fully specify the PATH instead of using $PATH. 
 
 
 
> errors = open('/home/myuser/error', 'wb') 
> 
> with tempfile.TemporaryDirectory() as tmpdirname: 
> tempthing = os.path.join(tmpdirname, thing) 
> fh = open(tempthing, 'wb') 
> fh.write(b'123') 
> fh.close() 
> zipname = '{}.zip'.format(thing) 
> ziptempfile = os.path.join(tmpdirname, zipname) 
> 
 
Can you add right here: 
 print("PATH: %s" % os.environ['PATH'], file=errors) 
 
and see what the PATH is in your errors file? 
 
-- 
Craig 
___ 
freebsd-python@freebsd.org mailing list 
http://lists.freebsd.org/mailman/listinfo/freebsd-python 
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org" 




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


Re: Re: Python Subprocess Crontab Problem

2015-06-10 Thread Robert Simmons
On Wed, Jun 10, 2015 at 5:33 PM, Chris Wojo  wrote:
> crontab isn't using a PATH for your specified user, so you need to give an
> absolute path.

This is the fix. Thanks everyone!
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 199138] [NEW PORT] devel/py-cov-core: Plugin core for use by pytest-cov, nose-cov and nose2-cov

2015-06-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199138

Kubilay Kocak  changed:

   What|Removed |Added

 Attachment #155149||maintainer-approval+
  Flags||

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 199138] [NEW PORT] devel/py-cov-core: Plugin core for use by pytest-cov, nose-cov and nose2-cov

2015-06-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199138

Kubilay Kocak  changed:

   What|Removed |Added

   Keywords|needs-qa|patch-ready

--- Comment #3 from Kubilay Kocak  ---
Revision accepted

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"