Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27085
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <andrea.crotti.0@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; 'needed,': 0.05; 'revision': 0.05; 'subject:code': 0.07; 'api': 0.09; 'it;': 0.09; 'project"': 0.09; 'received:mail-lpp01m010-f46.google.com': 0.09; 'sure,': 0.09; 'symlink': 0.09; 'thread,': 0.09; 'cc:addr:python- list': 0.10; 'accordingly.': 0.13; 'library': 0.15; 'perforce': 0.16; 'simpson': 0.16; 'subject:between': 0.16; 'subject:projects': 0.16; 'ways:': 0.16; 'workspace': 0.16; 'copied': 0.17; 'thanks,': 0.18; 'equivalent': 0.20; 'suggested': 0.20; 'import': 0.21; 'latter': 0.22; 'cheers,': 0.23; 'cc:2**0': 0.23; 'needed.': 0.23; 'this:': 0.23; "haven't": 0.23; 'project,': 0.24; 'thus': 0.24; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'separate': 0.27; 'tree': 0.27; 'message-id:@mail.gmail.com': 0.27; 'signatures': 0.29; 'things,': 0.29; '"the': 0.29; 'that.': 0.30; 'push': 0.30; 'received:209.85.215.46': 0.30; 'code': 0.31; 'could': 0.32; 'problem': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'project': 0.34; 'third': 0.34; 'subject:?': 0.35; 'similar': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'really': 0.36; 'skip:u 20': 0.36; 'but': 0.36; 'should': 0.36; 'skip:p 20': 0.36; 'two': 0.37; 'being': 0.37; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'things': 0.38; 'instead': 0.39; 'space': 0.39; 'short': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'end': 0.40; 'your': 0.60; 'real': 0.61; 'personally': 0.61; 'places': 0.61; 'procedure': 0.61; "you'll": 0.62; 'back': 0.62; 'more': 0.63; 'become': 0.65; 'copies.': 0.65; 'treat': 0.65; 'afraid': 0.66; 'potentially': 0.66; 'soon': 0.70 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eYgunAt0fqPubGg8p5Tjdz4wMohEueVcmT+6LGyqOA8=; b=Y3yGGU/To3rABxO2ThDUOP71GXEbptoaUb8LMt46HgJtue4SadtcayjWVRnzkPiyk4 mbiKsTmFVaLRuYWBE78jHEd2DpPSjFTuaa9GFUkO9z0wD/bZv8uvG9pYSrjB2UlclY34 Fwzehg/xAZUynhBPCddGGRYxRjZRXGsHn9ZN8fAfj0VTG1ltm5dmLcpQaAQFzUmy7A0Y V88VobinD2AnTJNtXJVft7LdJ5Sr5PGDeHHrZKT5/npz4kH971lVOOsQisBtzN/l4lHe GncMXj/j/H7Yk1SDmJpC1uUGO3Tl5W7DGm98GQ/53vK+3brzeE4P+yhznEYJDJVxRMK4 Opmw== |
| MIME-Version | 1.0 |
| In-Reply-To | <20120814215118.GA19167@cskk.homeip.net> |
| References | <CAF_E5JZ82ar7sWi5eOWe46N2wXVAX2QYUb5F9==0dxRbYMsEhg@mail.gmail.com> <20120814215118.GA19167@cskk.homeip.net> |
| Date | Wed, 15 Aug 2012 10:05:52 +0100 |
| Subject | Re: Sharing code between different projects? |
| From | andrea crotti <andrea.crotti.0@gmail.com> |
| To | Cameron Simpson <cs@zip.com.au> |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3306.1345021555.4697.python-list@python.org> (permalink) |
| Lines | 55 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1345021555 news.xs4all.nl 6871 [2001:888:2000:d::a6]:44160 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:27085 |
Show key headers only | View raw
2012/8/14 Cameron Simpson <cs@zip.com.au>: > > Having just skimmed this thread, one thing I haven't quite seen suggested is > this: > > Really do make a third "utilities" project, and treat "the project" and > "deploy" as separate notions. So to actually run/deploy project A's code > you'd have a short script that copied project A and the utilities project > code into a tree and ran off that. Or even a simple process/script to > update the copy of "utilities" in "project A"'s area. > > So you don't "share" code on an even handed basis but import the > "utilities" library into each project as needed. > > I do this (one my own very small scale) in one of two ways: > > - as needed, copy the desired revision of utilities into the project's > library space and do perforce's equivalent of Mercurial's addremove > on that library tree (comment "update utilities to revision X"). > > - keep a perforce work area for the utilities in your project A area, > where your working project A can hook into it with a symlink or some > deploy/copy procedure as suggested above. > With this latter one you can push back into the utilities library > from your "live" project, because you have a real checkout. So: > > projectAdir > projectA-perforce-checkout > utilities-perforce-checkout > projectBdir > projectB-perforce-checkout > utilities-perforce-checkout > Thanks, is more or less what I was going to do.. But I would not use symlinks and similar things, because then every user should set it up accordingly. Potentially we could instead use the perforce API to change the workspace mappings at run-time, and thus "force" perforce to checkout the files in the right place.. There is still the problem that people should checkout things from two places all the time instead of one.. > Personally I become more and more resistent to cut/paste even for small > things as soon as multiple people use it; you will never get to backport > updates to even trivial code to all the copies. > > Cheers, Well sure, but on the other end as soon as multiple people use it you can't change any of the public functions signatures without being afraid that you'll break something..
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Sharing code between different projects? andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-15 10:05 +0100
csiph-web