Hi all, I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion: - demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__ When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file: __author__="amit" __date__ ="$14 Jan, 2009 2:37:34 PM$" from setuptools import setup,find_packages setup ( name = 'EggDemo', version = '0.1', Summary = 'Just another Python package for the cheese shop', author = 'amit', author_email = '', url = '', license = '', description= 'Long description of the package', platform= '', packages = find_packages(), ) In the resulting, SOURCES.txt file, I have: setup.py EggDemo.egg-info/PKG-INFO EggDemo.egg-info/SOURCES.txt EggDemo.egg-info/dependency_links.txt EggDemo.egg-info/top_level.txt subpackage1/__init__.py As you can see, the top-level 'demo1.py' is missing, even though I have a '__init.py__' file there. The manual at http://peak.telecommunity.com/DevCenter/setuptools#using-find-packages makes me believe, this should work. Where am I going wrong? Best, Amit -- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 14.01.2009 10:20 Uhr, Amit k. Saha wrote:
Hi all,
I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion:
- demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__
When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file:
Using 'sdist' is usually good-enough unless you are working on binary distributions. 'sdist' usually includes everything - especially stuff under revision control (at least when using SVN). - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkltrv4ACgkQCJIWIbr9KYymiQCfbXOaJKOKGnk8pCOouPAxt0Pi RVUAoJyHMsSgdYKUp455EgdhPFmt4mpA =tRaw -----END PGP SIGNATURE-----
Hello Andreas, On Wed, Jan 14, 2009 at 2:53 PM, Andreas Jung <lists@zopyx.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 14.01.2009 10:20 Uhr, Amit k. Saha wrote:
Hi all,
I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion:
- demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__
When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file:
Using 'sdist' is usually good-enough unless you are working on binary distributions. 'sdist' usually includes everything - especially stuff under revision control (at least when using SVN).
Doesn't help my cause. The result is the same. PS: None of my sources is under version control. -Amit
- -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkltrv4ACgkQCJIWIbr9KYymiQCfbXOaJKOKGnk8pCOouPAxt0Pi RVUAoJyHMsSgdYKUp455EgdhPFmt4mpA =tRaw -----END PGP SIGNATURE-----
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in
Hey Amit, a __init__.py file needs to be contained in a folder to make the folder a package. Check out the python documentation for more information. And you should move your setup file on the same level as the top-level package The reason why find_packages() does'nt find your mainpackage is because it is searching for packages on the same level or below the setup.py. You have to change your directory layout to this: ################### setup.py mainpackackage demo1.py __init.py__ subpackage1 __init.py/__ #################### Cheers, Lutz Am 14.01.2009 um 10:37 schrieb Amit k. Saha:
Hello Andreas,
On Wed, Jan 14, 2009 at 2:53 PM, Andreas Jung <lists@zopyx.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 14.01.2009 10:20 Uhr, Amit k. Saha wrote:
Hi all,
I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion:
- demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__
When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file:
Using 'sdist' is usually good-enough unless you are working on binary distributions. 'sdist' usually includes everything - especially stuff under revision control (at least when using SVN).
Doesn't help my cause. The result is the same.
PS: None of my sources is under version control.
-Amit
- -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkltrv4ACgkQCJIWIbr9KYymiQCfbXOaJKOKGnk8pCOouPAxt0Pi RVUAoJyHMsSgdYKUp455EgdhPFmt4mpA =tRaw -----END PGP SIGNATURE-----
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
On Wed, Jan 14, 2009 at 3:34 PM, Lutz Paelike <lutz_p@gmx.net> wrote:
Hey Amit,
a __init__.py file needs to be contained in a folder to make the folder a package.
I had missed the 'folder' thingy..
Check out the python documentation for more information.
And you should move your setup file on the same level as the top-level package The reason why find_packages() does'nt find your mainpackage is because it is searching for packages on the same level or below the setup.py.
You have to change your directory layout to this:
################### setup.py
mainpackackage demo1.py __init.py__
subpackage1 __init.py/__ ####################
Done. Thanks a lot Lutz ! -Amit
Cheers,
Lutz
Am 14.01.2009 um 10:37 schrieb Amit k. Saha:
Hello Andreas,
On Wed, Jan 14, 2009 at 2:53 PM, Andreas Jung <lists@zopyx.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 14.01.2009 10:20 Uhr, Amit k. Saha wrote:
Hi all,
I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion:
- demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__
When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file:
Using 'sdist' is usually good-enough unless you are working on binary distributions. 'sdist' usually includes everything - especially stuff under revision control (at least when using SVN).
Doesn't help my cause. The result is the same.
PS: None of my sources is under version control.
-Amit
- -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkltrv4ACgkQCJIWIbr9KYymiQCfbXOaJKOKGnk8pCOouPAxt0Pi RVUAoJyHMsSgdYKUp455EgdhPFmt4mpA =tRaw -----END PGP SIGNATURE-----
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in
Amit k. Saha wrote:
On Wed, Jan 14, 2009 at 3:34 PM, Lutz Paelike <lutz_p@gmx.net> wrote:
Hey Amit,
a __init__.py file needs to be contained in a folder to make the folder a package.
I had missed the 'folder' thingy..
Glad you've got a solution that works for you but IIRC it should be possible to do as you originally intended by explicitly adding py_modules = ['demo1.py'] in your setup call. Raphael
Check out the python documentation for more information.
And you should move your setup file on the same level as the top-level package The reason why find_packages() does'nt find your mainpackage is because it is searching for packages on the same level or below the setup.py.
You have to change your directory layout to this:
################### setup.py
mainpackackage demo1.py __init.py__
subpackage1 __init.py/__ ####################
Done. Thanks a lot Lutz !
-Amit
Cheers,
Lutz
Am 14.01.2009 um 10:37 schrieb Amit k. Saha:
Hello Andreas,
On Wed, Jan 14, 2009 at 2:53 PM, Andreas Jung <lists@zopyx.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 14.01.2009 10:20 Uhr, Amit k. Saha wrote:
Hi all,
I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion:
- demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__
When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file: Using 'sdist' is usually good-enough unless you are working on binary distributions. 'sdist' usually includes everything - especially stuff under revision control (at least when using SVN). Doesn't help my cause. The result is the same.
PS: None of my sources is under version control.
-Amit
- -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkltrv4ACgkQCJIWIbr9KYymiQCfbXOaJKOKGnk8pCOouPAxt0Pi RVUAoJyHMsSgdYKUp455EgdhPFmt4mpA =tRaw -----END PGP SIGNATURE-----
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
On Tue, Jan 20, 2009 at 3:59 PM, Raphael Ritz <r.ritz@biologie.hu-berlin.de> wrote:
Amit k. Saha wrote:
On Wed, Jan 14, 2009 at 3:34 PM, Lutz Paelike <lutz_p@gmx.net> wrote:
Hey Amit,
a __init__.py file needs to be contained in a folder to make the folder a package.
I had missed the 'folder' thingy..
Glad you've got a solution that works for you but IIRC it should be possible to do as you originally intended by explicitly adding
py_modules = ['demo1.py']
in your setup call.
I have added this line to my 'setup.py' file, but the result remains the same. Thanks for the suggestion! -Amit
Raphael
Check out the python documentation for more information.
And you should move your setup file on the same level as the top-level package The reason why find_packages() does'nt find your mainpackage is because it is searching for packages on the same level or below the setup.py.
You have to change your directory layout to this:
################### setup.py
mainpackackage demo1.py __init.py__
subpackage1 __init.py/__ ####################
Done. Thanks a lot Lutz !
-Amit
Cheers,
Lutz
Am 14.01.2009 um 10:37 schrieb Amit k. Saha:
Hello Andreas,
On Wed, Jan 14, 2009 at 2:53 PM, Andreas Jung <lists@zopyx.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 14.01.2009 10:20 Uhr, Amit k. Saha wrote:
Hi all,
I am just learning the basics of building Python eggs using 'setuptools'. What I have is the following code structure in a top-down fashion:
- demo1.py - __init.py__ - setup.py -subpackage1 --__init.py/__
When I execute 'python setup.py bdist_egg' from the top-level directory which has the 'setup.py' file:
Using 'sdist' is usually good-enough unless you are working on binary distributions. 'sdist' usually includes everything - especially stuff under revision control (at least when using SVN).
Doesn't help my cause. The result is the same.
PS: None of my sources is under version control.
-Amit
- -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkltrv4ACgkQCJIWIbr9KYymiQCfbXOaJKOKGnk8pCOouPAxt0Pi RVUAoJyHMsSgdYKUp455EgdhPFmt4mpA =tRaw -----END PGP SIGNATURE-----
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Amit Kumar Saha http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in
At 11:29 AM 1/20/2009 +0100, Raphael Ritz wrote:
Amit k. Saha wrote:
On Wed, Jan 14, 2009 at 3:34 PM, Lutz Paelike <lutz_p@gmx.net> wrote:
Hey Amit,
a __init__.py file needs to be contained in a folder to make the folder a package. I had missed the 'folder' thingy..
Glad you've got a solution that works for you but IIRC it should be possible to do as you originally intended by explicitly adding
py_modules = ['demo1.py']
in your setup call.
Omit the '.py' though -- that would mean you're installing the 'py' module of the 'demo1' package (i.e., 'demo1/py.py') -- which is probably not what you want. ;-)
participants (5)
-
Amit k. Saha
-
Andreas Jung
-
Lutz Paelike
-
Phillip J. Eby
-
Raphael Ritz