Met Problem with Distutils

S

steven

if i want a main executable py script installed on the /usr/local/bin,
what do i do? i tried the data_files options in the setup.py, but
nothing happened, no the expected file appeared in the resulted tarbar.

below is the setup.py:

setup(name='foopkg',

version='1.0',

author="Steven Woody",

author_email="(e-mail address removed)",

url="http://a.b.c",

packages=['foopkg'],

scripts=['scripts/*.py'],

data_files=[('/usr/local/bin', ['scripts/myprj.py'])]

)


can anyone tell me what is wrong?

thanks in advance!

-
narke
 
R

Robert Kern

if i want a main executable py script installed on the /usr/local/bin,
what do i do? i tried the data_files options in the setup.py, but
nothing happened, no the expected file appeared in the resulted tarbar.

Generally speaking, you, the author, shouldn't dictate to the user
exactly where to install stuff to. There are reasons to break this rule,
but installing exectuable scripts is too common to be one of them.

The way for the user to install scripts to the location of their choice
is given here:

http://docs.python.org/inst/alt-install-windows.html

In short, use the --install-scripts command-line option, or the
setup.cfg/.pydistutils.cfg snippet:

[install]
install_scripts=...

--
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
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top