Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Chris Barker
 And in mingw-w64, the only way to select a non-default CRT
>
what is a "default" CRT in this case??

> CRT issues are indeed tricky, because they only bite in certain
> circumstances -- so long as you never pass a FILE* or a fileno across the
> dll boundary, or call malloc in one module and free in the other, or ...
>
Which happens to be EXACTLY what I'm needing to do right now

then it works fine. Except when it doesn't :-).
>
yup -- a new developer on my team spent yesterday bangin his head agaist
this -- then asked "I'm compiling the lib with VS2013, the the python
extension with VS2008, could that be the problem? -- uh, yes?

The Python core developers made the decision a long time ago to use the MS
compilers for the "official" distributions -- as they are the "platform"
compilers. And as far as I know, everyone else has followed that path for
compatibility (Enthought Canopy, Anaconda, ActiveState) (except cygWin, but
that's not really the Windows platform, IFAIC). Given MS decision to both:
tie the compiler tightly to the run-time, AND make it hard to get old
versions of the compiler, that's turned out to be a pain. But I suspect
there have been real advantages over, for instance, building the whole
thing on MinGW.

But in any case, that's what we've got -- and it would be really nice  to
support teh community as best we can, as has been done fro Python2.7 with
updates to setuptools and the MS download of the old VS2008.

It sounds like we don't expect MS t help out in this case, but at least we
can better document what users need to do, and how to do it -- and NOT with
a "kludge together an open-source compiler and cross your fingers" approach.

OK -- I'm going to get off my soap box now -- time to actually suggest doc
patches

-Chris

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Washington DC Python sprint report

2015-09-29 Thread Chris Barker - NOAA Federal
Sent from my iPhone

> On Sep 28, 2015, at 2:18 PM, Barry Warsaw  wrote:
>
>> On Sep 28, 2015, at 08:22 AM, Guido van Rossum wrote:
>>
>> I saw that you had a need for an asyncio tutorial. I wonder if the "500
>> lines" chapter on asyncio would help? I didn't write it; I only write the
>> asyncio is pretty powerful so it would be nice to have
> Python documentation for newcomers.
>
> I'm sure I'm not the right person to write it though.

I think you'd be a great person to write those docs -- in partnership
with someone that really understands the guts.

The first step to docs is knowing what questions to answer, and in
what order to answer them. You've recently gone through the process of
trying to figure it out for a particular use case -- you know just
what questions you had.

And you even just posted the start of an outline.

Whether that's what you want to do with your limited time is another question...

CHB



> Cheers,
> -Barry
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Steve Dower

On 29Sep2015 0820, Chris Barker wrote:

OK -- I'm going to get off my soap box now -- time to actually suggest
doc patches


Just bear in mind that you're suggesting patches for Python 3.3 and 3.4, 
which means that 3.4.4 is the only real chance to get them onto people's 
machines. http://docs.python.org/ already points to the 3.5 docs by 
default, which means only people who explicitly look for the earlier 
versions will see the changes.


You don't really have a huge audience, so I wouldn't invest large 
amounts of time in the official docs. A couple of well-publicised blog 
posts will reach more people.


Cheers,
Steve

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Oscar Benjamin
On Tue, 29 Sep 2015 17:20 Steve Dower  wrote:

On 29Sep2015 0820, Chris Barker wrote:
> OK -- I'm going to get off my soap box now -- time to actually suggest
> doc patches

Just bear in mind that you're suggesting patches for Python 3.3 and 3.4,
which means that 3.4.4 is the only real chance to get them onto people's
machines. http://docs.python.org/ already points to the 3.5 docs by
default, which means only people who explicitly look for the earlier
versions will see the changes.

You don't really have a huge audience, so I wouldn't invest large
amounts of time in the official docs. A couple of well-publicised blog
posts will reach more people.

Maybe but I think it would be good to have some documentation somewhere
(perhaps under the pypa banner) that can advise extension module authors
who want to provide Windows binaries for multiple CPython versions. It's
not obvious how to go about setting things up to make python.org compatible
binaries for say Python 2.7 and 3.2-3.5. Before 3.5 the simplest solution
was to use MinGW but that doesn't work for 3.5 (hence numpy are currently
uploading rcs without 3.5 binaries for Windows).

Just an explanation of what it takes in terms of MS compilers and which
free as in beer ones are available where would be helpful which could go in
a blog post as you say. IMO It would be more helpful though if it were a
continuously improved document that will be updated as new CPython releases
come out and the availability of MS compilers changes.

--
Oscar
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Chris Barker - NOAA Federal
> I'm not sure why INADA Naoki's answer above wasn't sufficient for you?

It may be -- I've still have to test. Neither Windows nor py3 are my
primary production versions.

But the last time I tried the SDK approach was for py2.7 on Win64, and
it was both a pain, and impossible to set up to "just work" in my
highly secure environment.

So at best, it needs some serious documentation. And no, it shouldn't
be just a blog post somewhere (unless maybe Steve Dowers's blog).

Thus whole issue has been dogging python on windows for many years --
it never has been easy to find out what to do.

In fact, there are all sorts of Blog posts out there, with various
levels of out of date, conflicting, or just plain wrong advice.

A definitive version in the official docs would be a very good thing.

BTW, I think this is a good discussion:

https://github.com/cython/cython/wiki/CythonExtensionsOnWindows

But not everyone is going to think to look at the Cython Wiki...

-Chris


> You need to have the SDK compilers on your PATH (by running the
> relevant environment setting command) and you need to set the
> environment variable DISTUTILS_USE_SDK=1 (this latter bit of
> information is hard to find documented, admittedly, but pretty well
> known).
>
> That basically gives you a Visual Studio 2010 equivalent environment.
> You'll still have all sorts of *other* problems building extensions on
> Windows, but unless I'm missing something important in what you were
> saying, getting a compiler isn't the issue.
>
> Paul
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Chris Barker - NOAA Federal
> On Sep 29, 2015, at 9:20 AM, Steve Dower  wrote:
>
>> On 29Sep2015 0820, Chris Barker wrote:
>> OK -- I'm going to get off my soap box now -- time to actually suggest
>> doc patches
>
> Just bear in mind that you're suggesting patches for Python 3.3 and 3.4, 
> which means that 3.4.4 is the only real chance to get them onto people's 
> machines.

I don't expect to get it onto anyone's machine -- does anyone download
docs anymore?

> http://docs.python.org/ already points to the 3.5 docs by default, which 
> means only people who explicitly look for the earlier versions will see the 
> changes.

Well, if your trying to build an extension for 3.4, hopefully you'll
think to look at 3.4 docs.

But good point -- the 3.5 docs should have a note saying that the
requirements are different than older releases.

> You don't really have a huge audience, so I wouldn't invest large amounts of 
> time in the official docs. A couple of well-publicised blog posts will reach 
> more people.

Not on my blog.

At this point, I think the Cython Wiki us the best place to point
people, but really, less than ideal.

-CHB


>
> Cheers,
> Steve
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Nathaniel Smith
On Sep 29, 2015 8:22 AM, "Chris Barker"  wrote:
>
>>  And in mingw-w64, the only way to select a non-default CRT
>
> what is a "default" CRT in this case??

To answer the question: mingw-w64's
standard/default/only-officially-supported CRT is msvcrt.dll (the version
that has no version number in the name). Wikipedia tells me that this is
the runtime used by msvc 4.2 - 6.0 (the later of which was released in
1998). The reason for this decision is that for whatever historical reason,
this particular CRT dll is shipped with Windows by default, and thus using
it avoids certain license issues that can otherwise arise, esp. with GPL
software. (Fortunately not an issue for python extensions, but since it is
an issue for other programs they just made the decision to support a single
configuration that works for everybody. Except when it doesn't ;-).)

In practice mingw-w64 ships its own runtime as a layer on top of msvcrt.dll
-- it gets used as a OS services layer, but mingw-w64 users aren't just
getting dropped directly into a wonderland of 15+ year old code.

(In fact, mingw-w64 upstream would like to make their runtime clever enough
to bind the underlying "OS services layer" at load time rather than compile
time, so that mingw-w64 compiled dll's would be "runtime agile" and could
be safely loaded into any process. The main thing we care about is just
that this would give upstream a way to officially support targeting newer
CRTs, but it would have a number of other benefits too: one modern
toolchain that could build extension modules for all versions of python,
the ability when combined with Python's "stable abi" to target 3.2+ with a
single binary distribution, better interoperability between python and
other windows ecosystems that went the mingw-w64 route like R... but, this
all requires funding someone to do the work.)

-n
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] VS 2010 compiler

2015-09-29 Thread Paul Moore
On 25 September 2015 at 16:35, INADA Naoki  wrote:
> You can use "Windows SDK for Windows 7 and .NET Framework 4".
>
> http://www.microsoft.com/en-us/download/details.aspx?id=8279
>
> On Sat, Sep 26, 2015 at 12:24 AM, Chris Barker - NOAA Federal
>  wrote:
>>
>> As I understand it, the MS VS2010 compiler is required (or at least
>> best practice) for compiling Python extensions for the python.org
>> Windows builds of py 3.4 and ?[1]
>>
>> However, MS now makes it very hard (impossible?) to download VS2010
>> Express ( or Community, or whatever the free as in beer version is
>> called).
>>
>> I realize that this is not python-dev's responsibility, but if there
>> is any way to either document where it can be found, or put a bit of
>> pressure on MS to make it available, as they have for VS2008 and
>> py2.7, that would be great.
>>
>> Sorry to bug this list, I didn't know where else to reach out to.

On 29 September 2015 at 16:20, Chris Barker  wrote:
> It sounds like we don't expect MS t help out in this case, but at least we
> can better document what users need to do, and how to do it -- and NOT with
> a "kludge together an open-source compiler and cross your fingers" approach.

I'm not sure why INADA Naoki's answer above wasn't sufficient for you?
You need to have the SDK compilers on your PATH (by running the
relevant environment setting command) and you need to set the
environment variable DISTUTILS_USE_SDK=1 (this latter bit of
information is hard to find documented, admittedly, but pretty well
known).

That basically gives you a Visual Studio 2010 equivalent environment.
You'll still have all sorts of *other* problems building extensions on
Windows, but unless I'm missing something important in what you were
saying, getting a compiler isn't the issue.

Paul
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com