[issue28705] Clean up design FAQ question about compiling to C

2017-09-05 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
pull_requests: +3380

___
Python tracker 

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



[issue28705] Clean up design FAQ question about compiling to C

2016-11-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0a3dab4ed66 by Brett Cannon in branch '3.6':
Issue #28705: greatly simplify the FAQ entry on transpiling.
https://hg.python.org/cpython/rev/a0a3dab4ed66

New changeset 89e2201142f9 by Brett Cannon in branch 'default':
Merge for issue #28705
https://hg.python.org/cpython/rev/89e2201142f9

--
nosy: +python-dev

___
Python tracker 

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



[issue28705] Clean up design FAQ question about compiling to C

2016-11-18 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



Re: Question about compiling python 30 from subversion repository on OSX

2011-04-24 Thread Ned Deily
In article 
c1ffbdb9-1a2b-41d7-970d-e7de1a973...@glegroupsg2000goo.googlegroups.com
,
 Anthony Kong anthony.hw.k...@gmail.com wrote:
 I have checked out source code from this url 
 http://svn.python.org/projects/python/branches/py3k, then run
 
 ./configure  --with-universal-archs=64-bit
 make
 
 First of all, I got this message:
 
 ---
 Modules/Setup.dist is newer than Modules/Setup;
 check to make sure you have all the updates you
 need in your Modules/Setup file.
 Usually, copying Modules/Setup.dist to Modules/Setup will work.
 ---
 
 Then the build failed with these messages
 
 /usr/bin/ranlib: file: libpython3.3m.a(dynamic_annotations.o) has no symbols
 /usr/bin/ranlib: file: libpython3.3m.a(pymath.o) has no symbols
 ranlib libpython3.3m.a
 ranlib: file: libpython3.3m.a(dynamic_annotations.o) has no symbols
 ranlib: file: libpython3.3m.a(pymath.o) has no symbols
 gcc   -framework CoreFoundation -o python.exe Modules/python.o 
 libpython3.3m.a -ldl  -framework CoreFoundation
 Could not find platform dependent libraries exec_prefix
 Consider setting $PYTHONHOME to prefix[:exec_prefix]
 Fatal Python error: Py_Initialize: can't initialize sys standard streams
 Traceback (most recent call last):
   File /Users/antkong/wd/python/python3/Lib/io.py, line 60, in module
 /bin/sh: line 1: 55310 Abort trap  CC='gcc' LDSHARED='gcc -bundle 
 -undefined dynamic_lookup  ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall 
 -Wstrict-prototypes' ./python.exe -E ./setup.py build
 make: *** [sharedmods] Error 134
 
 
 I wonder what caused these error messages. Is it possible that I am checking 
 out the wrong branch?

Python development has recently moved from using Subversion to Mercurial 
(hg).  The py3k branch in the svn repository at that URL is now frozen 
in-time and not being updated.

$ svn info
Path: .
URL: http://svn.python.org/projects/python/branches/py3k
Repository Root: http://svn.python.org/projects
Repository UUID: 6015fed2-1504-0410-9fe1-9d1591cc4771
Revision: 88828
Node Kind: directory
Schedule: normal
Last Changed Author: giampaolo.rodola
Last Changed Rev: 88761
Last Changed Date: 2011-03-06 13:04:47 -0800 (Sun, 06 Mar 2011)

Information on how to access the hg repos is contained in the new Python 
Developer's Guide:

   http://docs.python.org/devguide/setup.html

If you use hg to clone a copy of the current repo, you'll see something 
more like this:

$ hg clone http://hg.python.org/cpython
$ cd cpython
$ hg log -b default
changeset:   69534:020ebe0be33e
user:Antoine Pitrou solip...@pitrou.net
date:Sat Apr 23 17:56:06 2011 +0200
summary: Remove unused private function

Try the build again from a clean directory using the current hg repo.  
That said, if the message appears, follow the directions about copying 
Modules/Setup.dist to Modules/Setup.  That is likely the source of your 
original build failure.

 The 3.2 branch 
 (http://svn.python.org/projects/python/branches/release32-maint) can be 
 compiled without much issue.

That is out-of-date as well.  All current development and maintenance 
branches (2.7, 3.1, 3.2, default(=py3k)) are now maintained in the hg 
repo as described in the developer's guide.

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list


Question about compiling python 30 from subversion repository on OSX

2011-04-23 Thread Anthony Kong
Hi, all,

I have checked out source code from this url 
http://svn.python.org/projects/python/branches/py3k, then run

./configure  --with-universal-archs=64-bit
make

First of all, I got this message:

---
Modules/Setup.dist is newer than Modules/Setup;
check to make sure you have all the updates you
need in your Modules/Setup file.
Usually, copying Modules/Setup.dist to Modules/Setup will work.
---

Then the build failed with these messages

/usr/bin/ranlib: file: libpython3.3m.a(dynamic_annotations.o) has no symbols
/usr/bin/ranlib: file: libpython3.3m.a(pymath.o) has no symbols
ranlib libpython3.3m.a
ranlib: file: libpython3.3m.a(dynamic_annotations.o) has no symbols
ranlib: file: libpython3.3m.a(pymath.o) has no symbols
gcc   -framework CoreFoundation -o python.exe Modules/python.o libpython3.3m.a 
-ldl  -framework CoreFoundation
Could not find platform dependent libraries exec_prefix
Consider setting $PYTHONHOME to prefix[:exec_prefix]
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File /Users/antkong/wd/python/python3/Lib/io.py, line 60, in module
/bin/sh: line 1: 55310 Abort trap  CC='gcc' LDSHARED='gcc -bundle 
-undefined dynamic_lookup  ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes' ./python.exe -E ./setup.py build
make: *** [sharedmods] Error 134


I wonder what caused these error messages. Is it possible that I am checking 
out the wrong branch?

The 3.2 branch (http://svn.python.org/projects/python/branches/release32-maint) 
can be compiled without much issue.


Cheers



-- 
http://mail.python.org/mailman/listinfo/python-list


Question about compiling.

2007-01-10 Thread Steven W. Orr
I *just* read the tutorial so please be gentle. I created a file called 
fib.py which works very nicely thank you. When I run it it does what it's 
supposed to do but I do not get a resulting .pyc file. The tutorial says I 
shouldn't do anything special to create it. I have machines that have both 
2.4.1 and 2.3.5. Does anyone have an idea what to do?

TIA

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question about compiling.

2007-01-10 Thread Gabriel Genellina

At Tuesday 9/1/2007 14:56, Steven W. Orr wrote:


I *just* read the tutorial so please be gentle. I created a file called
fib.py which works very nicely thank you. When I run it it does what it's
supposed to do but I do not get a resulting .pyc file. The tutorial says I
shouldn't do anything special to create it. I have machines that have both
2.4.1 and 2.3.5. Does anyone have an idea what to do?


Welcome to Python!
When you run a script directly, no .pyc file is generated. Only when 
a module is imported (See section 6.1.2 on the tutorial). And don't 
worry about it...



--
Gabriel Genellina
Softlab SRL 







__ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Question about compiling.

2007-01-10 Thread Bjoern Schliessmann
Steven W. Orr wrote:

 I *just* read the tutorial so please be gentle. I created a file
 called fib.py which works very nicely thank you. When I run it it
 does what it's supposed to do but I do not get a resulting .pyc
 file. 

.pyc files are created only if you import a .py file.

Regards,


Björn

-- 
BOFH excuse #77:

Typo in the code

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question about compiling.

2007-01-10 Thread Rob Wolfe
Gabriel Genellina [EMAIL PROTECTED] writes:

 At Tuesday 9/1/2007 14:56, Steven W. Orr wrote:

I *just* read the tutorial so please be gentle. I created a file called
fib.py which works very nicely thank you. When I run it it does what it's
supposed to do but I do not get a resulting .pyc file. The tutorial says I
shouldn't do anything special to create it. I have machines that have both
2.4.1 and 2.3.5. Does anyone have an idea what to do?

 Welcome to Python!
 When you run a script directly, no .pyc file is generated. Only when a
 module is imported (See section 6.1.2 on the tutorial). And don't
 worry about it...

That's not the whole truth. :)
If you want to compile your script, you can do that, of course:

$ ls fib*
fib.py
$ python2.4 -mpy_compile fib.py
$ ls fib*
fib.py  fib.pyc

-- 
HTH,
Rob
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question about compiling.

2007-01-10 Thread tac-tics
 That's not the whole truth. :)

The whole truth is that from a developer's POV, .pyc files are
unimportant.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Question About Compiling.

2006-12-01 Thread Paul Boddie
Fredrik Lundh wrote:
 yndesai wrote:

  Is it that no compiling facility is hindering the growth of python
  in commercial circuit . . . ?

I can see the point of people who are confused about single file
executables for Python programs, who are possibly new to the technology
and don't know where to look [1] or which questions to ask, and I can
also see the need in various situations for people to make such
executables. That said, I don't buy into the kind of hypothetical ISVs
need this and that pontification seen on places like Planet GNOME,
written by people who work at companies like Novell. The commercial
circuit will use a technology (and, in fact, have been using Python
for some time) when they recognise the genuine benefits of the
technology, and if the technology doesn't deliver exactly what they had
in mind, they'll either put in some effort to shape it to their liking
or they'll look elsewhere. If none of this activity has any community
benefit, I'd argue that there's only so much the community should be
prepared to do to fix such commercial objections - if what a business
wants is valuable enough, that business should be prepared to pay for
it.

 (why are you blaming you inability to use Linux installation tools on
 Python, btw?  most basic Python libraries are only an apt-get away if
 you're using a sane Linux distribution.)

This is true enough, and by packaging one's programs correctly, Python
gets automatically brought into the picture when the user asks to
install those programs. It's interesting to consider this in the
context of the recent Linux Standard Base discussions on python-dev:
LSB potentially mitigates issues with shipping executables across
different distributions and would be beneficial to those wanting to
deploy Python applications in such a way. I notice, however, that the
discussion has taken the peanut gallery position of name-calling and
mock outrage at the packaging practices of various distributions [2],
presumably whilst advocating Python-only solutions like setuptools -
something which really isn't going to work well with any large
heterogeneous collection of software packages. Moreover, the
distributions have to more urgently deal with various issues not yet
sufficiently addressed by the Python core developers, particularly
architecture issues [3] and licensing issues [4].

Freezing applications has been a fairly well-understood process for the
last ten years, but more cooperation with heterogeneous packaging
technologies would be far preferable. After all, distributions are
actually responsible for a large amount of Python usage, and it would
be far better if people actually tried to work with them to resolve
some of the supposedly inflammatory aspects of their packaging
practices rather than just shouting bad things at them from a distance
[5]. A bit of not invented here [6] suppression would also be quite
welcome, along with taking the needs of vendors [7] other than Apple
Computer Inc. into account.

Paul

P.S. And while a frank discussion [7] did appear to result in a
comprehensive exchange of views between Debian and setuptools
developers, I'd like to see a bit more understanding for end-users and
people who don't want to ignore their system's package management.
Python plays well with others is a frequent claim, after all.

[1] http://wiki.python.org/moin/DistributionUtilities
[2]
http://mail.python.org/pipermail/python-dev/2006-November/070032.html
[3]
http://mail.python.org/pipermail/python-dev/2006-November/070043.html
[4]
http://mail.python.org/pipermail/python-dev/2006-November/070054.html
[5]
http://mail.python.org/pipermail/python-dev/2006-November/070055.html
[6]
http://mail.python.org/pipermail/python-dev/2006-November/070101.html
[7]
http://mail.python.org/pipermail/distutils-sig/2005-November/005500.html

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Question About Compiling.

2006-11-30 Thread Tim Roberts
Scheol Service [EMAIL PROTECTED] wrote:

Im just unsure on how to compile python code into .exe executionable
files.  Is there a simple way to do this?

Sort of.  Python code is not compiled to machine language.  Instead, it is
compiled to an intermediate language that is then interpreted.  That means
that, at run-time, there must be an interpreter available.

However, there are several packages that will gather up a copy of the
interpreter, your script, and whatever scripts and libraries it might need,
and pack them all into a .exe.  To the end user, it looks like a compiled
program.  py2exe is one example.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza  Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Python Question About Compiling.

2006-11-30 Thread yndesai
I got attracted to python since I heard about PythonCAD,
while I used Fortran and Basic during graduation
days  VBA for some macros in Office.

I liked the python as it seems smart. But without compiling it is
a trouble to end user.

I downloaded PythonCAD and am still searching for the libraries
GLIB GTK PYGTK and what not. Then there are dependancies
issues of these libs on LINUX.

I am scratching my head on how I would get the PythonCAD
running.

Is it that no compiling facility is hindering the growth of python
in commercial circuit . . . ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Question About Compiling.

2006-11-30 Thread Fredrik Lundh
yndesai wrote:

 Is it that no compiling facility is hindering the growth of python
 in commercial circuit . . . ?

good thing most commercial Python developers haven't noticed this, then. 
  if you don't know that some random guy on the internet thinks that 
some- thing doesn't exist, there's nothing that keeps you from using it ;-)

(why are you blaming you inability to use Linux installation tools on 
Python, btw?  most basic Python libraries are only an apt-get away if 
you're using a sane Linux distribution.)

/F

-- 
http://mail.python.org/mailman/listinfo/python-list


Python Question About Compiling.

2006-11-29 Thread Scheol Service
-- Forwarded message --
From: Scheol Service [EMAIL PROTECTED]
Date: Nov 29, 2006 10:57 PM
Subject: Python Question About Compiling.
To: mailto:python-list@python.org


Im just unsure on how to compile python code into .exe executionable
files.  Is there a simple way to do this?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Question About Compiling.

2006-11-29 Thread Gabriel Genellina

At Thursday 30/11/2006 02:02, Scheol Service wrote:


Im just unsure on how to compile python code into .exe executionable
files.  Is there a simple way to do this?


py2exe


--
Gabriel Genellina
Softlab SRL 


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python Question About Compiling.

2006-11-29 Thread Fredrik Lundh
Scheol Service wrote:

 Im just unsure on how to compile python code into .exe executionable
 files.  Is there a simple way to do this?

typing compile python code into google gives you

 http://effbot.org/zone/python-compile.htm

which gives you some background, and links to a bunch of bundling tools.

/F

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Question About Compiling.

2006-11-29 Thread Gabriel G

At Thursday 30/11/2006 03:40, Scheol Service wrote:


i know this. Is there better directions on how to use it?


Have you tried it? What's your actual problem? See http://www.py2exe.org/


--
Gabriel Genellina
Softlab SRL 


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
-- 
http://mail.python.org/mailman/listinfo/python-list