distutils package_dir newbie

P

peter

Hello all,

I've have following problem

the layout of my program is the following:
setup.py
project_dev/__init__.py
project_dev/someModule.py

now I want to make a source-installer so python setup.py install will
give the following directory stucture:

site-packages/project_user/__init__.py
site-packages/project_user/someModule.py

notice the namechange from project_dev to project_user

how do I achieve a namechange from project_dev to project_user???

I've tried several different versions of command package_dir options in
the setup function:
package_dir = {'project_user': 'project_dev'}
also package_dir = {'project_dev':'project_user'}
both without any success. (relatively unintuitive option this is)

Can anybody give the correct way to achieve a directory-renaming when
creating an installer?

kind regards

Peter

keywords: renaming, directory, sdist, distutils, package_dir
 
R

Robert Kern

peter said:
Hello all,

I've have following problem

the layout of my program is the following:
setup.py
project_dev/__init__.py
project_dev/someModule.py

now I want to make a source-installer so python setup.py install will
give the following directory stucture:

site-packages/project_user/__init__.py
site-packages/project_user/someModule.py

notice the namechange from project_dev to project_user

how do I achieve a namechange from project_dev to project_user???

I've tried several different versions of command package_dir options in
the setup function:
package_dir = {'project_user': 'project_dev'}
also package_dir = {'project_dev':'project_user'}
both without any success. (relatively unintuitive option this is)

Can anybody give the correct way to achieve a directory-renaming when
creating an installer?

Works just fine for me.

from distutils.core import *

setup(name='somePackage',
packages = ['project_user'], # <- Are you sure you have this?
package_dir = {'project_user': 'project_dev'},
)

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
P

peter

thx for answering is such short notice.

I recieve the following error when I use your setup:
error: package directory 'project_user' does not exist
(the complete error is added at the end of this document)

I'm using python 2.3.5 (build by activeState) based on python 2.3.5

Do you have an idea what could have happened here?

kind regards

Peter

ps.
complete error
running sdist
warning: sdist: missing required meta-data: url
warning: sdist: missing meta-data: either (author and author_email) or
(maintain
er and maintainer_email) must be supplied
warning: sdist: manifest template 'MANIFEST.in' does not exist (using
default fi
le list)
warning: sdist: standard file not found: should have one of README,
README.txt
error: package directory 'project_user' does not exist
 
R

Robert Kern

peter said:
thx for answering is such short notice.

I recieve the following error when I use your setup:
error: package directory 'project_user' does not exist
(the complete error is added at the end of this document)

I'm using python 2.3.5 (build by activeState) based on python 2.3.5

Do you have an idea what could have happened here?

No. Works just fine on Python 2.3.5 on OS X. Did you copy-and-paste the
setup.py file I gave? or did you type it yourself? Could you please give
the full setup.py that you used?

(And please do some kind of quoting of the message you are responding to.)

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
P

peter

hello Robert

I've tried your setup.py file and now it seems to work...
I've made the following fault in the setup:
I did use:
setup(..., packages = ['project_dev'], ...) instead of the correct one:
setup(..., packages = ['project_user'], ...)

you have been a great help

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top