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


Groups > comp.lang.python > #27110

Re: Sharing code between different projects?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <miki.tebeka@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'pypi': 0.07; 'setup.py': 0.07; 'subject:code': 0.07; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'code?': 0.16; 'from:addr:miki.tebeka': 0.16; 'from:name:miki tebeka': 0.16; 'perforce': 0.16; 're-run': 0.16; 'route,': 0.16; 'subject:between': 0.16; 'subject:projects': 0.16; 'url:html)': 0.16; 'mechanism': 0.17; 'specify': 0.17; 'version.': 0.17; '(or': 0.18; 'libraries': 0.22; 'second': 0.24; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; "doesn't": 0.28; 'things,': 0.29; 'probably': 0.29; "i'm": 0.29; 'that.': 0.30; 'problem': 0.33; 'version': 0.34; 'received:google.com': 0.34; 'third': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'client': 0.36; 'itself': 0.37; 'two': 0.37; 'moment': 0.37; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'instead': 0.39; 'link': 0.60; 'matter': 0.61; 'url:o': 0.83; 'insane': 0.93
Newsgroups comp.lang.python
Date Wed, 15 Aug 2012 11:07:36 -0700 (PDT)
In-Reply-To <mailman.3258.1344935429.4697.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=75.82.8.111; posting-account=uo-8fwoAAACKsFzFX78JHudx1V7WDXZ0
References <CAF_E5JZ82ar7sWi5eOWe46N2wXVAX2QYUb5F9==0dxRbYMsEhg@mail.gmail.com> <CAH1RVigtOfZ5K34WOMqDPY0LrgWqRZg3y3g1=qRZY5v-qYgPCw@mail.gmail.com> <mailman.3258.1344935429.4697.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 75.82.8.111
MIME-Version 1.0
Subject Re: Sharing code between different projects?
From Miki Tebeka <miki.tebeka@gmail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Cc python-list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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>
Message-ID <mailman.3321.1345054060.4697.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1345054060 news.xs4all.nl 6978 [2001:888:2000:d::a6]:48344
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:27110

Show key headers only | View raw


> In plus I'm using perforce which doesn't have any svn:externals-like
You can probably use views to this (http://www.perforce.com/perforce/r12.1/manuals/cmdref/o.views.html).

> Second problem is that one of the two projects has a quite insane
> requirement, which is to be able to re-run itself on a specific
> version depending on a value fetched from the database.
You can probably play with PYTHONPATH to do that.

> The third problem is that from the moment is not just me using these
> things, how can I be sure that changing something will not break
> someone else code?
That's always a problem with libraries you distribute, no matter what is the mechanism for distribution.

If you go the views/link way. You can link to tags instead of trunk (or the perforce equivalent) and then client can still to know "good" version. If you go the PyPi route, you can specify package version in setup.py dependencies (foo==0.10.2)

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


Thread

Re: Sharing code between different projects? andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-14 10:10 +0100
  Re: Sharing code between different projects? Miki Tebeka <miki.tebeka@gmail.com> - 2012-08-15 11:07 -0700
  Re: Sharing code between different projects? Miki Tebeka <miki.tebeka@gmail.com> - 2012-08-15 11:07 -0700

csiph-web