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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top