Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'suppose': 0.05; 'exec': 0.07; 'terry': 0.07; 'url:bitbucket': 0.07; 'python': 0.08; 'command.': 0.09; 'setup.py': 0.09; 'am,': 0.12; 'subject:file': 0.13; 'language,': 0.15; 'copied.': 0.16; 'egg': 0.16; 'file).': 0.16; 'non-python': 0.16; 'reedy': 0.16; 'subject:install': 0.16; 'subject:non': 0.16; 'subject:package': 0.16; 'suffix': 0.16; 'wed,': 0.17; 'wrote:': 0.18; '>>>': 0.18; "'python": 0.18; 'received:209.85.210.174': 0.18; 'received:mail- iy0-f174.google.com': 0.18; 'template': 0.19; "doesn't": 0.23; 'header:In-Reply-To:1': 0.23; 'correctly.': 0.24; 'sender:addr:gmail.com': 0.25; 'code': 0.25; "skip:' 30": 0.28; 'skip:b 20': 0.29; 'message-id:@mail.gmail.com': 0.29; 'url:wiki': 0.29; 'module': 0.30; 'url:src': 0.30; "skip:' 10": 0.30; 'skip:b 30': 0.30; 'nov': 0.31; 'pm,': 0.31; 'thu,': 0.32; 'me?': 0.32; 'to:addr:python-list': 0.32; 'it.': 0.33; 'source': 0.33; 'skip:b 40': 0.34; 'idea': 0.34; 'copied': 0.34; 'copying': 0.35; 'trouble': 0.35; 'data,': 0.35; 'project': 0.35; 'question': 0.35; 'problem.': 0.36; 'explain': 0.36; 'file': 0.36; 'example,': 0.36; 'but': 0.37; 'could': 0.38; 'run': 0.38; 'received:google.com': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'should': 0.39; 'either': 0.39; 'help': 0.39; 'why': 0.39; 'got': 0.39; 'subject:: ': 0.39; 'change': 0.39; 'to:addr:python.org': 0.39; 'data': 0.40; 'files': 0.40; 'received:209': 0.40; 'code:': 0.40; 'according': 0.60; 'your': 0.61; '2011': 0.62; '"how': 0.80; 'easy_install': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=U4zEpQ7JY+jPzNPMPzvGmATelNtnL4Kh9abKJUQK5mo=; b=FwNz1I1IhIlCFHGaVxOZ9uTOmUupTNVzsyjX13M7cJIWA7vsc+ZvEDpcbqSmdPDF5H w96UE8cEUP4y3uNon4Uklemmg19QFi8QogAQSr7YxJ4H4GnOGGpnqTFLcJaKn0vj1eOr QGsUUx3gKq2+IRPWQ2Xv1JkQUfg1MpiEGtISE= MIME-Version: 1.0 Sender: kwatch@gmail.com In-Reply-To: References: Date: Thu, 10 Nov 2011 12:25:06 +0900 X-Google-Sender-Auth: GCRYz6i9HwQHU-U7S_z5RfP-Hvk Subject: Re: easy_install doesn't install non-package *.py file From: Makoto Kuwata To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 67 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1320895510 news.xs4all.nl 6964 [2001:888:2000:d::a6]:58731 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15524 On Thu, Nov 10, 2011 at 9:58 AM, Makoto Kuwata wrote: > On Wed, Nov 9, 2011 at 4:09 AM, Terry Reedy wrote: >> On 11/7/2011 11:32 PM, Makoto Kuwata wrote: >>> >>> I got trouble about easy_install command. >>> >>> My package: >>> >>> =A0 README.rst >>> =A0 setup.py >>> =A0 foobar/ >>> =A0 foobar/__init__.py >>> =A0 foobar/data/ >>> =A0 foobar/data/template.py >>> >>> In the above example, 'foobar/data/template.py' is just a >>> template data file (=3D not a python module file). >> >> Then why is it .py? If it is just data, use .txt. If .py, it should be >> python code run either directly or imported, though I suppose you could = exec >> it. (I have no idea how renaming would affect your problem.) >> > > I want to use template names according to language, > such as template.py, template.html, template.rst, template.js, and so on. > > My question is "how to include non-python files into egg file?" > I may change file name suffix from '.py' to '.py.template', > but it doesn't solve my problem. I create sample project to explain my trouble. Sample project source code: https://bitbucket.org/kwatch/helloworld/src When 'python setup.py sdist', all files are copied correctly. https://bitbucket.org/kwatch/helloworld/wiki/python_setup.py_sdist $ python setup.py sdist .... hard linking helloworld/__init__.py -> HelloWorld-0.1.0/helloworld hard linking helloworld/foo.py -> HelloWorld-0.1.0/helloworld hard linking helloworld/sub/__init__.py -> HelloWorld-0.1.0/helloworld/= sub hard linking helloworld/sub/bar.py -> HelloWorld-0.1.0/helloworld/sub .... But when 'python setup.py bdist_egg', some files are not copied. https://bitbucket.org/kwatch/helloworld/wiki/python_setup.py_bdist_egg $ python setup.py bdist # 'helloworld/sub/{__init__,bar}.py' are not copied! .... copying build/lib/helloworld/__init__.py -> build/bdist.macosx-10.4-x86_64/egg/helloworld copying build/lib/helloworld/foo.py -> build/bdist.macosx-10.4-x86_64/egg/helloworld .... Could you help me? -- regards, makoto kuwata