473,320 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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='pyspread',
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={'pyspread': '.'},
scripts=['pyspread.py'],
py_modules=['pyspread.mainapp', 'pyspread.pysgrid', 'pyspread.mygrid','pyspread.icontheme'],
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 1047
On May 18, 3:31*pm, Martin Manns <mma...@gmx.netwrote:
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='pyspread',
* * * 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='mma...@gmx.net',
* * * url='http://sourceforge.net/projects/pyspread/',
* * * packages=['pyspread'],
* * * package_dir={'pyspread': '.'},
* * * scripts=['pyspread.py'],
* * * py_modules=['pyspread.mainapp', 'pyspread.pysgrid', 'pyspread.mygrid','pyspread.icontheme'],
* * * 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
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...
1
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...
7
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
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)....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.