These are chat archives for cherrypy/cherrypy

6th
Jan 2017
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 10:03 UTC
It looks like you are just starting to learn Python :)
Kearney Taaffe
@gitKearney
Jan 06 2017 15:04 UTC
yeah, pretty much
I'm not super great at Python. But, I can take the SOLID and DRY from PHP and apply it to Python
Kearney Taaffe
@gitKearney
Jan 06 2017 15:14 UTC
I actually think CherryPy's greatest strength is its routing capability.
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 15:42 UTC
@gitKearney read about the way of storing dependencies https://caremad.io/posts/2013/07/setup-vs-requirement/
you could make your readme at least 3 times smaller
Kearney Taaffe
@gitKearney
Jan 06 2017 15:44 UTC
@webknjaz thanks buddy!
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 15:46 UTC
also nowadays nobody explains how to install Python/pip
Kearney Taaffe
@gitKearney
Jan 06 2017 15:51 UTC
@webknjaz the reason I didn't use MySQLdb (from PIP) but instead chose the one from MySQL was a lack of working examples of the MySQLdb package
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 15:52 UTC
pip install https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-2.1.5.tar.gz#egg=mysql-connector-python
Kearney Taaffe
@gitKearney
Jan 06 2017 15:54 UTC
dang! I didn't know pip could install from a URI
so, what does the #egg=mysql-connector-python mean? I don't see that on the end of the URI on the download page
Jason R. Coombs
@jaraco
Jan 06 2017 16:01 UTC
The egg signals to the installer what package is represented by the URL, in this case mysql-connector-python.
Kearney Taaffe
@gitKearney
Jan 06 2017 16:06 UTC

cool! I thought eggs were zip files with some extra data in them. I didn't know I could use tarballs, git repos, or directories.

So, do I have to put mysql-connector-python? Could I put anything, like mysql_database_driver?

Jason R. Coombs
@jaraco
Jan 06 2017 16:16 UTC
My guess is that would cause problems because it’s meant to be a hint as to what package will get installed when pip expands that zipfile and runs setup.py install on it. The name should be the same that setup.py --name emits.
(optionally with the version as well)
Kearney Taaffe
@gitKearney
Jan 06 2017 16:18 UTC
@jaraco thanks! I'll update the README, and will also try store the dependencies in the setup file like @webknjaz suggested
Jason R. Coombs
@jaraco
Jan 06 2017 16:18 UTC
Good luck!
Kearney Taaffe
@gitKearney
Jan 06 2017 16:22 UTC
So, this is another n00b question, but, I just need to include the dependencies in setup.py, right? And, then running the command python setup.py would install all of the dependencies, right?
not sure if y'all are familiar with nodeJS, but, basically, it's like running npm install. All dependencies are fetched and installed
Jason R. Coombs
@jaraco
Jan 06 2017 16:26 UTC
@gitKearney It’s not quite as clean as with node, but if you run pip install -e ., that will install the package with setup.py and its dependencies. The -e means install in editable mode, so the edits you make to the package locally will be immediately reflected in the environment were you’ve installed.
I suggest reading the Python Packaging Users Guide.
Kearney Taaffe
@gitKearney
Jan 06 2017 16:29 UTC
@jaraco thanks for helping out
Guess reading Python Tutorial didn't make me as l33t as I thought
Jason R. Coombs
@jaraco
Jan 06 2017 16:50 UTC
It comes with time. And there’s always more to know.
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 16:51 UTC
Yeah, but first follow PEP8 at least :)
Jason R. Coombs
@jaraco
Jan 06 2017 18:00 UTC
meh
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 18:01 UTC
@gitKearney alternatively it is possible to use requirements.txt file, read about it in the article I sent you
Jason R. Coombs
@jaraco
Jan 06 2017 18:01 UTC
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 18:04 UTC
yea
@gitKearney also consider learning Zen Of Python principles https://www.python.org/dev/peps/pep-0020/
Nicklas Börjesson
@nicklasb
Jan 06 2017 18:04 UTC
I’d appreciate if we keep opinions about peoples coding style more to ourselves and instead give them more help on getting going.
I am sure PEP 8 will be adhered to at some point.
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 18:05 UTC
@jaraco is it possible to make build uri at Appveyor look cherrypy/cherrypy?
Jason R. Coombs
@jaraco
Jan 06 2017 18:05 UTC
I don’t know. Feel free to investigate.
I’m also happy to grant you access to /jaraco/cherrypy if that’s all we can do.
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 18:10 UTC
I couldn't find the way to do this either. I've been considering to configure Appveyor for a while, but couldn't find time for this. I even temporary gave up trying to make Travis CI run Python builds under OS X
Jason R. Coombs
@jaraco
Jan 06 2017 18:36 UTC
I’ve had some success with macOS on Travis in jaraco/keyring.
Sviatoslav Sydorenko
@webknjaz
Jan 06 2017 18:42 UTC
I'm trying to configure that with MacPython/terryfy