[issue21144] ensurepip AssertionError: Multiple .dist-info directories

2014-04-06 Thread Samuel John

Changes by Samuel John pyt...@samueljohn.de:


--
nosy: +samueljohn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21144
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] embedded interpreter or virtualenv fails with ImportError: cannot import name MAXREPEAT

2013-05-27 Thread Samuel John

Samuel John added the comment:

Ned, incredibly helpful description. Thanks for investigating! I have nothing 
to add to that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18050
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18071] _osx_support compiler_fixup

2013-05-27 Thread Samuel John

New submission from Samuel John:

In the `_osx_support.py` module, there seems to be a bug in the method 
`compiler_fixup` which occurs if 

* the `customize_compiler` method from `distutils/sysconfig` has been called 
and after that
* `_compile` from `distutils/unixcompiler.py` is called. The `_compile` method 
uses `_osx_support.compiler_fixup`.

The critical line in compiler_fixup is:

`compiler_so = list(compiler_so)`.

Usually `compiler_so` is a list like `['cc']` but not when `customize_compiler` 
(from sysconfig) has been called. The value returned by 
`sysconfig.get_config_var('LDSHARED')` is a unicode like for example in the 
case of a Python 2.7.5 built via Homebrew: 
  
cc -bundle -undefined dynamic_lookup -L/homebrew/lib 
-L/homebrew/opt/sqlite/lib -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk.
When `list()` is applied to the value, it is split at each character and that 
cannot be intended.

I am not sure if I fully understand, but to fix this in `compiler_fixup`, 
instead of `compiler_so = list(compiler_so)`, I'd propose something along the 
lines of:

if isinstance(compiler_so, (str,unicode)):
compiler_so = compiler_so.split()

I found this by trying to `pip install cython` (it uses customize_compiler, I 
guess) on a homebrewed python.

To reproduce in an interactive shell we can emulate what is going on by calling 
`compiler_fixup` directly with the values sysconfig has stored. The exact 
string does not matter, because I think the any value returned by 
`sysconfig_get_config_var` is a (unicode) string and not a list:

import sysconfig
import _osx_support

_osx_support.compiler_fixup(sysconfig.get_config_var('LDSHARED'),sysconfig.get_config_var('CFLAGS'))


Not sure if other python versions are affected. I wasn't aware of 
`_osx_support` at all until now.

--
assignee: ronaldoussoren
components: Macintosh
messages: 190140
nosy: hynek, ned.deily, ronaldoussoren, samueljohn
priority: normal
severity: normal
status: open
title: _osx_support compiler_fixup
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18071
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18071] _osx_support compiler_fixup

2013-05-27 Thread Samuel John

Samuel John added the comment:

The symptom for the end-user looks kind of weird:

running build_ext
building 'Cython.Plex.Scanners' extension
/ A p p l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p 
e r / T o o l c h a i n s / X c o d e D e f a u l t . x c t o o l c h a i n / u 
s r / b i n / c l a n g   - f n o - s t r i c t - a l i a s i n g   - f n o - c 
o m m o n   - d y n a m i c   - I / h o m e b r e w / i n c l u d e   - I / h o 
m e b r e w / o p t / s q l i t e / i n c l u d e   - i s y s r o o t   / A p p 
l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p e r / P 
l a t f o r m s / M a c O S X . p l a t f o r m / D e v e l o p e r / S D K s / 
M a c O S X 1 0 . 8 . s d k   - I / A p p l i c a t i o n s / X c o d e . a p p 
/ C o n t e n t s / D e v e l o p e r / P l a t f o r m s / M a c O S X . p l a 
t f o r m / D e v e l o p e r / S D K s / M a c O S X 1 0 . 8 . s d k / S y s t 
e m / L i b r a r y / F r a m e w o r k s / T k . f r a m e w o r k / V e r s i 
o n s / 8 . 5 / H e a d e r s   - D N D E B U G   - g   - f w r a p v   - O 3   
- W a l l   - W s t r i c t - p r o t 
 o t y p e s   
-I/homebrew/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7
 -c Cython/Plex/Scanners.c -o 
build/temp.macosx-10.8-x86_64-2.7/Cython/Plex/Scanners.o
unable to execute /: Permission denied
error: command '/' failed with exit status 1


Pasted here to help googlers to find it :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18071
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] _sre.MAXREPEAT not defined in 2.7.3

2013-05-24 Thread Samuel John

New submission from Samuel John:

As also discussed at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704084 
and https://github.com/mxcl/homebrew/pull/19300, Python 2.7.4 and 2.7.5 seem to 
have added an `from _sre import MAXREPEAT` to the sre_compile.py, sre_parse.py 
and sre_constants.py modules.

But python 2.7.3 (and older?) don't have the built in MAXREPEAT in _sre. Some 
virtualenvs have to be updated (which is easy) but some Software (such as vim, 
shipped with OS X 10.8.3) is statically linked to an older python 2.7.2 (I 
guess) but somehow picks up my newly built python 2.7.5 and attempts to load 
it's site.py. (Weechat also reported to being affected)

I think this is more a bug of vim/weechat etc. but we at homebrew have to do 
some hacky fix, because Apple is not going to update vim very soon, and so 
having a newer python in path breaks system stuff.

So I am fine if you close this here again. But at least we have a reference or 
perhaps you guys have a better idea how to work-around.

For homebrew, I propose a monkey-patch in re.py to the _sre module if it does 
not have a MAXREPEAT.


   try:
   from _sre import MAXREPEAT
   except ImportError:
   import _sre
   _sre.MAXREPEAT = 65535 # this monkey-patches all other places of from 
_sre import MAXREPEAT

--
components: Extension Modules, Regular Expressions
messages: 189924
nosy: ezio.melotti, mrabarnett, samueljohn
priority: normal
severity: normal
status: open
title: _sre.MAXREPEAT not defined in 2.7.3
type: crash
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18050
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1584] Mac OS X: building with X11 Tkinter

2013-01-03 Thread Samuel John

Samuel John added the comment:

Hello from Homebrew (Mac)!

Indeed we also patch setup.py (but right now only for python2.7) and 
uncommented the detect_tkinter_darwin related lines to support linking 
against a Tkinter build with homebrew (optionally with X11 support).

(Our patch: https://github.com/mxcl/homebrew/pull/16626/files#L0R270)

I agree that an option to tell setup.py to use another Tk would be much 
appreciated.

--
nosy: +samueljohn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Samuel John

New submission from Samuel John:

Some tools use `python-config --ldflags` to get the flags in order to link 
against the Python lib on OS X (for example gst-python from pygtk (2.x).

For framework builds, `python-config --ldflags` returns (among few other):

-u _PyMac_Error Python.framework/Versions/2.7/Python

which is an incomplete path.

This issue is almost a duplicate of http://bugs.python.org/issue3588 and the 
fix discussed there would work. However I report this for Python 2.7.

We at Homebrew propose a very similar fix but I'd prefer the one in issue3588:

LINKFORSHARED = -u _PyMac_Error -framework Python
LDFLAGS += -F$(PYTHONFRAMEWORKPREFIX)

--
components: Build
messages: 178936
nosy: hynek, ned.deily, ronaldoussoren, samueljohn
priority: normal
severity: normal
status: open
title: Mac OS X: python-config --ldflags and location of Python.framework
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16848
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Samuel John

Samuel John added the comment:

Agreed. My patch, I did for Homebrew is to use the full path like so:

PYTHONFRAMEWORKDIR= full/path/to/Frameworks/Python.framework

instead of just `Python.framework`.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16848
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2012-12-30 Thread Samuel John

Samuel John added the comment:

Sounds reasonable, but please put the libs not in a place that might conflict 
with a Tk installed by other means (e.g. homebrew's Tk is a `/usr/local`).

--
nosy: +samueljohn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15663
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13405] Add DTrace probes

2012-08-29 Thread Samuel John

Samuel John added the comment:

dtrace ignores PATH and CC and CPP. I tried that already :/

Of course I could just install the command line tools. But still it's a shame 
since all the tools are already there.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13405] Add DTrace probes

2012-08-28 Thread Samuel John

Samuel John added the comment:

I did your test. Thank you! 
You are absolutely right, it seems, dtrace does not honor CPP or PATH or 
any other flags and bluntly looks in a hard-coded location. It's not up to you 
to patch that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13405] Add DTrace probes

2012-08-22 Thread Samuel John

Samuel John added the comment:

On OS X 10.8 with Xcode only (no command line tools), I get the following err 
(when using clang or when using llvm-gcc):

```
dtrace: failed to compile script ./Include/pydtrace.d: Preprocessor not found
make: *** [Include/pydtrace.h] Error 1
```

At homebrew we optionally try to apply your patch to python 
https://github.com/mxcl/homebrew/pull/14343.

I'd really like to be able to make the Command Line Tools for Xcode optional.

Note, there is no cpp for clang. Usually, the CC=/path/to/clang just works. 
(I have seen CPP = $CC -E before, but that did *not* do the trick here).

Any ideas?

--
nosy: +samueljohn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15127] Supressing warnings with -w whether gcc supports ParseTuple

2012-06-21 Thread Samuel John

New submission from Samuel John pyt...@samueljohn.de:

In configrue.in, Python checks if the compiler supports 
__attribute__((format(PyArg_ParseTuple, 2, 3))) and sets the CFLAGS to CFLAGS 
-Werror to decide this test.

When you build Python with CFLAGS=-w (homebrew's default), configure reports 

whether gcc supports ParseTuple ... yes

which is not supported for clang (I was told).

I know it's hard to remove a certain flag from the CFLAGS, but perhaps there 
should be better documentation about this issue.

--
components: Build
messages: 163349
nosy: samueljohn
priority: normal
severity: normal
status: open
title: Supressing warnings with -w  whether gcc supports ParseTuple
type: compile error
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15127
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11445] python.exe on OS X shared-llbrary build erroneously linked to MacPorts python library

2012-06-11 Thread Samuel John

Changes by Samuel John pyt...@samueljohn.de:


--
nosy: +samueljohn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11445
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14499] Extension module builds fail with Xcode 4.3 on OS X 10.7 due to SDK move

2012-06-11 Thread Samuel John

Changes by Samuel John pyt...@samueljohn.de:


--
nosy: +samueljohn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14499
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14980] ranlib: file: libpython2.7.a(pymath.o) has no symbols

2012-06-01 Thread Samuel John

New submission from Samuel John pyt...@samueljohn.de:

Building python on the Mac (10.7.4) with latest Xcode shows

```
[...]
ranlib: file: libpython2.7.a(pymath.o) has no symbols
```

Is that okay or a bug?

--
assignee: ronaldoussoren
components: Macintosh
messages: 162078
nosy: ronaldoussoren, samueljohn
priority: normal
severity: normal
status: open
title: ranlib: file: libpython2.7.a(pymath.o) has no symbols
type: compile error
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14980
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14980] OSX: ranlib: file: libpython2.7.a(pymath.o) has no symbols

2012-06-01 Thread Samuel John

Changes by Samuel John pyt...@samueljohn.de:


--
title: ranlib: file: libpython2.7.a(pymath.o) has no symbols - OSX: ranlib: 
file: libpython2.7.a(pymath.o) has no symbols

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14980
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com