Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6931 > unrolled thread
| Started by | Seb S <sebas.home1@gmail.com> |
|---|---|
| First post | 2011-06-03 01:57 -0700 |
| Last post | 2011-06-05 23:28 +1000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Distutils beginner question - windows Seb S <sebas.home1@gmail.com> - 2011-06-03 01:57 -0700
Re: Distutils beginner question - windows Mark Hammond <skippy.hammond@gmail.com> - 2011-06-05 23:28 +1000
| From | Seb S <sebas.home1@gmail.com> |
|---|---|
| Date | 2011-06-03 01:57 -0700 |
| Subject | Distutils beginner question - windows |
| Message-ID | <44bc9107-acee-4ab0-b0ca-adb3b9a7a582@glegroupsg2000goo.googlegroups.com> |
Hi all,
Just a quick question , I have a simple script I want to convert into a windows installer and give to some friends.
I had a look at http://docs.python.org/distutils/introduction.html and wrote this setup script:
#!/usr/bin/env python
from distutils.core import setup
setup(name="C:\data\Sendmailmsg.py",
version='1.0',
description='Python Distribution Utilities',
author='Sebas929 ',
author_email=' ',
url=' ',
py_modules=['urllib','smtplib'],
)
I tried to run this - "C:\Data\Setup.py" bdist_wininst - in a cmd prompt.
C:\Data\ contains my script Sendmailmsg.py and Setup.py
I am getting the error :
file urllib.py (for module urllib) not found
file smtplib.py (for module smtplib) not found
file urllib.py (for module urllib) not found
file smtplib.py (for module smtplib) not found
warning: install_lib: 'build\lib' does not exist -- no Python modules to install
This creates an installer which crashes when I use it.
I have a few questions:
How can I fix this error ?
Can I use '.\myscript.py' in the name parameter to make it look in the same directory as setup.py?
When I have it as an installer what happens? When I install it will there be something you can click which will run the script?
I have never tried this before so I am probably missing something obvious, thanks in advance for any help.
[toc] | [next] | [standalone]
| From | Mark Hammond <skippy.hammond@gmail.com> |
|---|---|
| Date | 2011-06-05 23:28 +1000 |
| Message-ID | <mailman.2466.1307280541.9059.python-list@python.org> |
| In reply to | #6931 |
On 3/06/2011 6:57 PM, Seb S wrote: > > Hi all, > > Just a quick question , I have a simple script I want to convert into a windows installer and give to some friends. > I had a look at http://docs.python.org/distutils/introduction.html and wrote this setup script: > > > #!/usr/bin/env python > > from distutils.core import setup > > setup(name="C:\data\Sendmailmsg.py", > version='1.0', > description='Python Distribution Utilities', > author='Sebas929 ', > author_email=' ', > url=' ', > py_modules=['urllib','smtplib'], > ) > > > I tried to run this - "C:\Data\Setup.py" bdist_wininst - in a cmd prompt. > C:\Data\ contains my script Sendmailmsg.py and Setup.py > I am getting the error : I think you misunderstand what bdist_wininst is for and probably want py2exe (where you just tell it you want to package Sendmailmsg.py and it finds all other dependent modules like smtplib etc, bundles them up with a full python runtime and rolls it into a nice executable) HTH, Mark
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web