-
Notifications
You must be signed in to change notification settings - Fork 0
KingZuluKing/Test-python-package-with-script-LPTHW-EX46
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
public domain code [email protected] This is code I wrote for "extra credit" in exercise 46 of "Learn Python the Hard Way" by Zed Shaw http://learnpythonthehardway.org The purpose is to see if I can create a very simple package that has a script installed too. As of 2012 July 29, it seems to work, but I'm not confident that I know what I'm doing. This is what I do to make it work: 1. From root directory (test2/) do the following (after having installed pip, distribute, virtualenv, nose) python setup.py sdist 2. This creates a dist/ directory with test2... tarball and test2.egg... directory with a bunch of files I don't understand. 3. Copy the tarball to ~/Documents/testing/ 4. From ~/Documents/testing/ directory, run sudo pip install test2... (the tarball file) 5. From same directory (probably any directory) run testscript.py This produced the following output: this is a test test over Some (of many) things I don't understand: A. In "setup.py", I had to include the full filename of the testscript. Whereas from docs.python.org/distutils/setupscript.html#installing-scripts it seemed like I shouldn't have to add the ".py" extension to the script name. But if I didn't include ".py" extension (as 'scripts': ['bin/testscript.py'], then I got the following error: not a regular file -- skipping
About
This is a set of files for exercise 46 of "Learn Python the Hard Way" that seems to work.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%