473,978 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

distutils directory problem

Hi,

I have the following problem with the distutils package:
(I have now spent hours reading and searching the manuals and tutorials,
and I am still stuck.)

I have a working directory
~/pyspread
in which my libraries are situated and two icons directories
~/pyspread/icons and ~/pyspread/icons/actions

Now I would like to create a setup.py file inside my ~/pyspread
directory that installs my .py modules in .../site-packages/pyspread
and the icons in appropriate sub-folders and adds pyspread.pth to
..../site-packages so that .../site-packages/pyspread is in the
PYTHONPATH.

However, my setup.py puts everything (including .pyc files) into
site-packages *and* into the sub-folders. What am I doing wrong?

I am looking for a platform-independent solution. Currently, I am using
python 2.5 on Linux.

Here my setup.py

#!/usr/bin/env python

from distutils.core import setup
setup(name='pys pread',
version='0.0.7' ,
description='A spreadsheet that accepts a pure python expression in each cell.',
license='GPL v3 :: GNU General Public License',
classifiers=[ 'Development Status :: 3 - Alpha',
'Intended Audience :: End Users/Desktop',
],
author='Martin Manns',
au************* *****@gmx.net',
url='http://sourceforge.net/projects/pyspread/',
packages=['pyspread'],
package_dir={'p yspread': '.'},
scripts=['pyspread.py'],
py_modules=['pyspread.maina pp', 'pyspread.pysgr id', 'pyspread.mygri d','pyspread.ic ontheme'],
package_data={' pyspread': ['icons/*.png', 'icons/actions/*.png' ,\
'test.pys', 'test.csv', 'test2.csv', \
'README', 'COPYING']},
)
Thanks in advance

Martin
Jun 27 '08 #1
1 1077
On May 18, 3:31*pm, Martin Manns <mma...@gmx.net wrote:
Hi,

I have the following problem with the distutils package:
(I have now spent hours reading and searching the manuals and tutorials,
and I am still stuck.)

I have a working directory
~/pyspread
in which my libraries are situated and two icons directories
~/pyspread/icons and ~/pyspread/icons/actions

Now I would like to create a setup.py file inside my ~/pyspread
directory that installs my .py modules in .../site-packages/pyspread
and the icons in appropriate sub-folders and adds pyspread.pth to
.../site-packages so that .../site-packages/pyspread is in the
PYTHONPATH.

However, my setup.py puts everything *(including .pyc files) into
site-packages *and* into the sub-folders. What am I doing wrong?

I am looking for a platform-independent solution. Currently, I am using
python 2.5 on Linux.

Here my setup.py

#!/usr/bin/env python

from distutils.core import setup
setup(name='pys pread',
* * * version='0.0.7' ,
* * * description='A spreadsheet that accepts a pure python expression in each cell.',
* * * license='GPL v3 :: GNU General Public License',
* * * classifiers=[ 'Development Status :: 3 - Alpha',
* * * * * * * * * * 'Intended Audience :: End Users/Desktop',
* * * ],
* * * author='Martin Manns',
* * * author_email='m ma...@gmx.net',
* * * url='http://sourceforge.net/projects/pyspread/',
* * * packages=['pyspread'],
* * * package_dir={'p yspread': '.'},
* * * scripts=['pyspread.py'],
* * * py_modules=['pyspread.maina pp', 'pyspread.pysgr id', 'pyspread.mygri d','pyspread.ic ontheme'],
* * * package_data={' pyspread': ['icons/*.png', 'icons/actions/*.png' ,\
* * * * * * * * * * * * * * * * *'test.pys', 'test.csv', 'test2.csv', \
* * * * * * * * * * * * * * * * *'README', 'COPYING']},
)

Thanks in advance

Martin
I highly recommend re-posting this to the distutils group. They have
some excellent people over there that can probably tell you quite
quickly what the issue is:

http://mail.python.org/mailman/listinfo/distutils-sig

Mike
Jun 27 '08 #2

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

Similar topics

8
1758
by: Johan Svedberg | last post by:
Hi! I just started playing around with Distutils and there is one thing I could use some help with. I'm wondering if there is some convenient way to access the directories where the data_files was installed? -- Johan Svedberg, johan@svedberg.pp.se, http://johan.svedberg.pp.se/
1
1728
by: Terry Hancock | last post by:
Some time ago, I got the idea that I wanted to build image resources from vector graphic originals, instead of marshalling hundreds of tiny little icon images by hand. I wrote "BuildImage" to do this for me, and so far, it works very well, so I'm trying to make it easier to use and available to more developers. There is a brief (and somewhat dated) tutorial explaining what BuildImage itself does at:
7
2488
by: Steven Bethard | last post by:
How do I get distutils to include my testing module in just the "sdist" distribution? My current call to setup() looks like:: distutils.core.setup( ... py_modules=, ) If change this to::
0
230
by: billiejoex | last post by:
Hi there, I'm having problems with creating an installer for a module of mine by using distutils. I'll try to explain my problem as clear as I can (sorry but English is not my first language). This is the structure of my module: -------------------------------- setup.py mypackage/ __init__.py
0
10359
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11835
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11433
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10922
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10089
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.