472,371 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

Re: Easy install / setuptools

En Thu, 29 May 2008 06:29:00 -0300, <Do*****************@ch.delarue.com>
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".
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='This is the description of myPackage',
packages=['myPackage'],
)
---end setup.py---

Read the "Distributing 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?
Well... don't use an egg in the first place :)
The problem with egg files is that you can't use
"open(os.path.join(os.path.dirname(__file__),'myFi le')" 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...
There are many other problems with egg files... (did I menction that I
hate eggs?)

--
Gabriel Genellina

Jun 27 '08 #1
1 1142
Gabriel Genellina wrote:
En Thu, 29 May 2008 06:29:00 -0300, <Do*****************@ch.delarue.com>
escribió:
>I'm trying to figure out the "best" way to distribute my own python
packages.

Well... don't use an egg in the first place :)
"easy install" usually isn't. It tends to do the wrong thing,
then leave things in a confused state. Too many things have to
be set up right before "easy install" works easily.

"python setup.py" is the de-facto standard.

Yes, there's no really good, standard solution for Python
installation.

John Nagle
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: seberino | last post by:
It appears that apps distributed as Python Eggs are either a single compressed blob in site-packages directory or a directory under site-packages directory. Is this ALWAYS true? So by just...
17
by: Harry George | last post by:
....at least around here. I run a corporate Open Source Software Toolkit, which makes hundreds of libraries and apps available to thousands of technical employees. The rules are that a) a very...
0
by: vedrandekovic | last post by:
Hello, I was download egg file bbfreeze-0.95.2-py2.4-win32.egg ( for windows of course ),and I have setuptools version 0.6c6 after I try install this with setuptools: $ ez_setup...
3
by: commander_coder | last post by:
Hello, I have some materials for a project that I am working on that I keep in a source code control system (svn now, but I'm experimenting with mercurial). I want to install these things from...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.