En Thu, 29 May 2008 06:29:00 -0300, <Dominique.Holz warth@ch.delaru e.com>
escribió:
You don't need setuptools at all. Just write a setup.py file using the
standard distutils module, and execute:
python setup.py bdist_wininst
It will create an executable installer. A simple setup.py script looks
like this:
---begin setup.py---
from distutils.core import setup
setup(name='My Package',
version='1.0',
description='Th is is the description of myPackage',
packages=['myPackage'],
)
---end setup.py---
Read the "Distributi ng Python Modules" document in your Python
installation, or at <http://docs.python.org/dist/dist.html>
Well... don't use an egg in the first place :)
There are many other problems with egg files... (did I menction that I
hate eggs?)
--
Gabriel Genellina
escribió:
I'm trying to figure out the "best" way to distribute my own python
packages. Basicly, what I want is to have something like an
"installer. exe" (on windows) which puts my package under
Python/Lib/site-packages (so that it can be found via the PYTHONPATH).
>
I've played around a bit with "easy install" and "setuptools " and the
.egg format. I've already managed to create a "myPackage. egg" file with
setup tools and "install" (it's just a copying) it ito the site-packages
directory using "easy install".
packages. Basicly, what I want is to have something like an
"installer. exe" (on windows) which puts my package under
Python/Lib/site-packages (so that it can be found via the PYTHONPATH).
>
I've played around a bit with "easy install" and "setuptools " and the
.egg format. I've already managed to create a "myPackage. egg" file with
setup tools and "install" (it's just a copying) it ito the site-packages
directory using "easy install".
standard distutils module, and execute:
python setup.py bdist_wininst
It will create an executable installer. A simple setup.py script looks
like this:
---begin setup.py---
from distutils.core import setup
setup(name='My Package',
version='1.0',
description='Th is is the description of myPackage',
packages=['myPackage'],
)
---end setup.py---
Read the "Distributi ng Python Modules" document in your Python
installation, or at <http://docs.python.org/dist/dist.html>
What I was wondering now is if there's a way to actually EXTRACT the egg
file and put the extracted file (i.e. the .py file) under site-packages.
And not the .egg?
file and put the extracted file (i.e. the .py file) under site-packages.
And not the .egg?
The problem with egg files is that you can't use
"open(os.path.j oin(os.path.dir name(__file__), 'myFile')" and I'd need to
rewrite such code which I'd like to avoid if possible. Also, I don't
know whether leaving the python scripts packed inside the egg file is
slower for execution or not...
"open(os.path.j oin(os.path.dir name(__file__), 'myFile')" and I'd need to
rewrite such code which I'd like to avoid if possible. Also, I don't
know whether leaving the python scripts packed inside the egg file is
slower for execution or not...
hate eggs?)
--
Gabriel Genellina
Comment