Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74683

Re: Multiple python versions, one dev environment???

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'package,': 0.03; 'environments': 0.07; 'installed.': 0.07; 'interpreter.': 0.07; 'python3': 0.07; 'versions,': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'assume': 0.14; '11:32': 0.16; 'be:': 0.16; 'condensed': 0.16; 'dependent.': 0.16; 'python3.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'scratch': 0.16; 'silly': 0.16; 'simple.': 0.16; 'subject:???': 0.16; 'subject:dev': 0.16; 'subject:versions': 0.16; 'valid.': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'python?': 0.22; 'tests': 0.22; 'header:User- Agent:1': 0.23; 'package.': 0.24; 'versions': 0.24; 'question': 0.24; 'source': 0.25; 'possibly': 0.26; 'header:X-Complaints- To:1': 0.27; 'van': 0.27; 'header:In-Reply-To:1': 0.27; 'testing': 0.29; 'am,': 0.29; 'generally': 0.29; 'specified': 0.30; 'code': 0.31; 'trivial': 0.31; 'probably': 0.32; 'thanks!': 0.32; 'run': 0.32; 'community': 0.33; 'problem': 0.35; 'test': 0.35; 'but': 0.35; 'version': 0.36; 'subject:one': 0.36; 'possible': 0.36; 'should': 0.36; 'two': 0.37; 'project': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'hope': 0.61; 'entire': 0.61; 'back': 0.62; 'offer': 0.62; 'hear': 0.63; 'personal': 0.63; 'strategy': 0.64; 'different': 0.65; 'wall': 0.65; 'background:': 0.68; 'touch': 0.74; 'other.': 0.75; 'contemplated': 0.84; 'facts:': 0.84; 'isolate': 0.84; 'yours': 0.88; 'reasons,': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ned Batchelder <ned@nedbatchelder.com>
Subject Re: Multiple python versions, one dev environment???
Date Thu, 17 Jul 2014 15:41:44 -0400
References <20140717173231.7cfefae5@xs4all.nl>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 18.189.82.30
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <20140717173231.7cfefae5@xs4all.nl>
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11957.1405626121.18130.python-list@python.org> (permalink)
Lines 62
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1405626121 news.xs4all.nl 2946 [2001:888:2000:d::a6]:54429
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74683

Show key headers only | View raw


On 7/17/14 11:32 AM, Joep van Delft wrote:
> Hello!
>
> The condensed version of the question would probably be: How does one
> deal with multiple interpreters and one package where you want to try
> some changes?
>
> The background:
> I made a trivial change to some package (docutils) to scratch a
> personal itch, and I want to offer this back to the community
> (whether it will be accepted or not). Because of this, I ran into
> some issues.
>
> Some facts:
> 1. Python3 is my main interpreter.
> 2. The tests of docutils only run under python2.
> 3. I desire not to touch my distribution's version of
>     site-packagesX-Y.
> 4. I prefer to have one and only one development directory of
>     my target package.
>
> My confusions:
> 1. Is it possible to have one source control managed directory of
>     some package, which is used by two versions of python?
> 2. I assume that the *.pyc-files generated while using some python
>     source are version dependent. What is the recommended way to have
>     'em both installed?
> 3. The way I have stumped a wall over here, is the puzzle of how to
>     make python2 have a different $PYTHONPATH as python3. I hope to
>     hear how this strategy is silly :)
> 4. I have contemplated the way of linking the source files from my
>     development directory into user specified site-packages
>     directories. Problem 3. still is valid.
> 5. Should venv and friends/foes com into play? If so: How?
>
> Appreciate any light shed on these issues.

Virtualenv is definitely the right way to isolate different Python 
environments from each other.  Each one has its own PYTHONPATH, so each 
project of yours can have different packages installed.

For testing one project on multiple versions of Python, use tox.  Its 
entire reason for being is to test Python code against multiple 
environments, generally for different Python versions, but possibly for 
other reasons, like different versions of dependencies.

Tox will manage the virtualenvs for you, it makes multi-version testing 
very simple.

>
> Thanks!
>
>
> 	Joep
>
>
>


-- 
Ned Batchelder, http://nedbatchelder.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Multiple python versions, one dev environment??? Joep van Delft <joepvandelft@xs4all.nl> - 2014-07-17 17:32 +0200
  Re: Multiple python versions, one dev environment??? Javier <nospam@nospam.com> - 2014-07-17 16:05 +0000
    Re: Multiple python versions, one dev environment??? Joep van Delft <joepvandelft@xs4all.nl> - 2014-07-17 21:52 +0200
      Re: Multiple python versions, one dev environment??? Javier <nospam@nospam.com> - 2014-07-17 21:52 +0000
  Re: Multiple python versions, one dev environment??? Akira <4kir4.1i@gmail.com> - 2014-07-17 16:29 +0000
  Re: Multiple python versions, one dev environment??? Ned Batchelder <ned@nedbatchelder.com> - 2014-07-17 15:41 -0400
    Re: Multiple python versions, one dev environment??? Joep van Delft <joepvandelft@xs4all.nl> - 2014-07-17 21:54 +0200
    Re: Multiple python versions, one dev environment??? Roy Smith <roy@panix.com> - 2014-07-17 19:44 -0400
      Re: Multiple python versions, one dev environment??? alex23 <wuwei23@gmail.com> - 2014-07-18 11:15 +1000
        Re: Multiple python versions, one dev environment??? Roy Smith <roy@panix.com> - 2014-07-17 21:29 -0400
          Re: Multiple python versions, one dev environment??? Chris Angelico <rosuav@gmail.com> - 2014-07-18 12:42 +1000

csiph-web