Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51307
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <kushal.kumaran@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'syntax': 0.04; 'true,': 0.05; 'correct.': 0.07; 'familiarity': 0.07; 'python3': 0.07; '2to3': 0.09; 'false,': 0.09; 'properly.': 0.09; 'setup.py': 0.09; 'python': 0.11; 'posted': 0.15; "%s'": 0.16; 'build_py': 0.16; 'clears': 0.16; 'diagnostic': 0.16; 'downloaded.': 0.16; 'nope,': 0.16; 'runs,': 0.16; 'setuptools.': 0.16; 'skip:/ 60': 0.16; 'subject:...?': 0.16; 'sudo': 0.16; 'syntaxerror:': 0.16; 'thursday,': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; '3.0': 0.19; 'seems': 0.21; 'import': 0.22; 'print': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; 'regardless': 0.24; 'source': 0.25; 'shown': 0.26; 'switch': 0.26; 'task': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; 'work.': 0.31; 'code': 0.31; 'page.': 0.31; '"",': 0.31; '25,': 0.31; '>>>>': 0.31; 'accomplished': 0.31; 'dated': 0.31; 'directory,': 0.31; 'though.': 0.31; 'writes:': 0.31; 'file': 0.32; 'run': 0.32; 'linux': 0.33; 'running': 0.33; '(most': 0.33; 'packaging': 0.33; 'skip:_ 10': 0.34; 'skip:d 20': 0.34; 'december': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'version': 0.36; 'impression': 0.36; "didn't": 0.36; "i'll": 0.36; 'should': 0.36; 'so,': 0.37; 'two': 0.37; 'limited,': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'problems.': 0.60; 'removing': 0.60; 'ago,': 0.61; 'john': 0.61; 'july': 0.63; 'more': 0.64; 'different': 0.65; 'invalid': 0.68; 'below:': 0.68; '2012.': 0.74; 'received:117': 0.78; 'message-id:@mx.google.com': 0.80; '3.3.1': 0.84; 'email name:john': 0.84; 'flag.': 0.84; 'scratch,': 0.84; '2013,': 0.91; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=8YnVNetVjldiGgl8sTJI2mlX3tNG8pyYOkmLABfYPc4=; b=scDDBQ8xGeOpIhHmq1l1bG3T+0cz9GOjYCBf0NXQTGXa8XsxvMewz7NDo+GzEc9s/1 dJZlqHBwQ+JbN6RU1t2PAXqj4CqcaVyGh9tkbVpNj/7fcD6Jn4IMv27jyBl4REX4JJmp YKltuoAWlX/ZyqSQ8Bam7SSKiteA7DZC6dF2+oxnA6A0+P+kW6dkx44uXy26Ozop9qDn Q+Luf7Cz7sRj5B3VBzDCrBW9Sj8NcDldfnlz31nMapwcuta0wr0rPlc6F/bbIbI2EjlQ L9NlwEJ7Fpaz5Vhjvpx+mm6V4QpdABV+1GwGY3ShvGf//JTc6V5T+Yjh+OAdVkg0malj Hkpg== |
| X-Received | by 10.66.240.140 with SMTP id wa12mr55670100pac.162.1374850743687; Fri, 26 Jul 2013 07:59:03 -0700 (PDT) |
| Sender | Kushal Kumaran <kushal.kumaran@gmail.com> |
| From | Kushal Kumaran <kushal.kumaran+python@gmail.com> |
| To | python-list@python.org |
| Subject | Re: PyGLet, 2to3...? |
| In-Reply-To | <d5edc756-bcdd-4e67-a659-68aaf575a8f0@googlegroups.com> |
| References | <4ddada8b-81fd-46e7-bd5d-eeab550a9fa7@googlegroups.com> <a548b0e1-4d48-4667-ae97-f356771140e6@googlegroups.com> <mailman.5103.1374763156.3114.python-list@python.org> <5c35c252-67ed-4810-88b2-6708ed321bee@googlegroups.com> <d5edc756-bcdd-4e67-a659-68aaf575a8f0@googlegroups.com> |
| User-Agent | Notmuch/0.15.2+174~gb6d4402 (http://notmuchmail.org) Emacs/24.2.1 (x86_64-pc-linux-gnu) |
| Date | Fri, 26 Jul 2013 10:22:16 +0530 |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5150.1374850752.3114.python-list@python.org> (permalink) |
| Lines | 88 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1374850753 news.xs4all.nl 15947 [2001:888:2000:d::a6]:39201 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:51307 |
Show key headers only | View raw
John Ladasky <john_ladasky@sbcglobal.net> writes:
> On Thursday, July 25, 2013 3:26:01 PM UTC-7, John Ladasky wrote:
>> I'll try again from scratch, and see whether that clears up my problems.
>
> Nope, that didn't work.
>
> =======================================
>
> john@john:~/Desktop/pyglet-1.2alpha1$ sudo python3 setup.py install
>
> [sudo] password for john:
>
> running install
> running build
> running build_py
> running install_lib
> running install_egg_info
> Removing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info
> Writing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info
>
> john@john:~/Desktop/pyglet-1.2alpha1$ python3
>
> Python 3.3.1 (default, Apr 17 2013, 22:30:32)
> [GCC 4.7.3] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import pyglet
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "./pyglet/__init__.py", line 276
----------^
Your import is attempting to import from your current directory, which
has the pre-2to3 version of the files packaged in the original
distribution. Switch away and try again.
> print '[%d] %s%s %s' % (thread, indent, name, location)
> ^
> SyntaxError: invalid syntax
>
> =======================================
>
> The source code link that Kushal posted is dated December 19, 2012. Since that was several months ago, I double-checked the source code of setup.py in the 1.2alpha1 package that I downloaded. It would appear to perform the same check of sys.version_info that was shown on the Google Code page.
>
> To see how that check actually runs, I saved a copy of setup.py as setup2.py, adding diagnostic calls to print() as shown in the code block below:
>
> =======================================
>
> if sys.version_info >= (3,):
> # Automatically run 2to3 when using Python 3
> print("Python version is 3.0 or later.") # I added this
> if _have_setuptools:
> print("Have setuptools.") # I added this
> setup_info["use_2to3"] = True
> else:
> print("Do not have setuptools.") # I added this
> from distutils.command.build_py import build_py_2to3
> setup_info["cmdclass"] = {"build_py" : build_py_2to3}
>
> =======================================
>
> Here's the output:
>
> =======================================
>
> john@john:~/Desktop/pyglet-1.2alpha1$ sudo python3 setup2.py install
>
> Python version is 3.0 or later.
> Do not have setuptools.
> running install
> running build
> running build_py
> running install_lib
> running install_egg_info
> Removing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info
> Writing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info
>
> =======================================
>
> So, I don't know much yet about this _have_setuptools flag. I don't know whether it has to be True, instead of False, in order for 2to3 to work properly. I get the impression from the code that 2to3 should run regardless of the _have_setuptools flag, it is just that the task is accomplished in two different ways?
That seems correct. My familiarity with the python packaging tools is
limited, though.
--
regards,
kushal
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python3, GUIs, game APIs, PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-24 22:26 -0700
Re: Python3, GUIs, game APIs, PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-24 23:56 -0700
Re: Python3, GUIs, game APIs, PyGLet, 2to3...? Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2013-07-25 14:05 +0530
Re: Python3, GUIs, game APIs, PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-25 15:26 -0700
PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-25 16:49 -0700
Re: PyGLet, 2to3...? Jerry Hill <malaclypse2@gmail.com> - 2013-07-26 09:39 -0400
Re: PyGLet, 2to3...? Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2013-07-26 10:22 +0530
Re: PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-26 16:35 -0700
Re: PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-26 18:19 -0700
Re: PyGLet, 2to3...? John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-26 21:00 -0700
csiph-web