Rocket icon indicating copy to clipboard operation
Rocket copied to clipboard

Fix to add methods directory to installer

Open mds2 opened this issue 7 years ago • 4 comments

This is an attempt to address at least some of the symptoms described in issue #7 . setup.py wasn't properly copying over the methods directory -- which was probably affecting the pypi version as well.

mds2 avatar Sep 14 '18 16:09 mds2

Note, I don't actually understand python's setup.py infrastructure. I just saw a problem and changed a line in a way that seemed to make sense for me. The result worked on my machine under python 2.7. It should probably be tested under python3. Oh hey, I could do that, hang on a second.

Alright, the setup.py installer doesn't crash under python3. Haven't tried running the server that way yet though. Caveat emptor or something.

mds2 avatar Sep 14 '18 16:09 mds2

Anyway, thanks for writing "rocket". It helped me with the web interface to a spit and chickenwire personal project involving a raspberry pi music player / alarm clock. I'd been using the "bottle" python web framework to serve the bits of the web front end, and, with the default wsgi single-threaded backend, it was hanging whenever a request timed out and blocking all future requests. I suppose I could've just configured the timeout to be ludicrously short (this project, obviously, does not have that many users per server), but instead I decided to go with a multithreaded web server. And "rocket" was the one of the suggested backends that was easiest for me to get running (setup.py issues aside, and hey, I fixed those locally!)

mds2 avatar Sep 15 '18 16:09 mds2

Talked to a friend who knows more about setup.py than I do, and he suggested that the preferred fix might instead by something like

$ git diff master
diff --git a/setup.py b/setup.py
index 22dcf9b..50f8b4e 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ setup(name = "Rocket",
       author = "Timothy Farrell",
       author_email = "[email protected]",
       url = "https://github.com/explorigin/Rocket",
-      packages = ['rocket'],
+      packages = ['rocket', 'rocket/methods'],
       license = "MIT License",
       package_data = {'':['*.py', '*.txt']},
       include_package_data = True,

mds2 avatar Sep 16 '18 18:09 mds2

@cwgreene suggested to me (in a private side-conversation) that the following fix might be better or more appropriate

diff --git a/setup.py b/setup.py
index 22dcf9b..50f8b4e 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ setup(name = "Rocket",
       author = "Timothy Farrell",
       author_email = "[email protected]",
       url = "https://github.com/explorigin/Rocket",
-      packages = ['rocket'],
+      packages = ['rocket', 'rocket/methods'],
       license = "MIT License",
       package_data = {'':['*.py', '*.txt']},
       include_package_data = True,

What can I say, I'm not too familiar with distutils. I tested his fix, and it also installs properly on my machine.

mds2 avatar Sep 18 '18 07:09 mds2