New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging Rearrange #118
Packaging Rearrange #118
Conversation
Hi, I'd love to get some movement on this - even if it is a flat refusal so i can look at other options. As it stands it is generally wrong and makes it very difficult to package HTTPretty for distributions. Packaging is something we need as HTTPretty becomes a dependency for some high profile projects. If you disagree with anything then I'm happy to debate it with you. Thanks, |
Hi @jamielennox, this pull request looks good besides bringing tests inside of the package. Is there another solution for you that doesn't involve including the tests? (You might have been emailed with just part of this comment, I kept hitting |
Ok, i've reduced the request to just the dependency changes. That's an interesting problem with sure that i can't really see a way around. In general it shouldn't matter because nothing would actually import httpretty.tests unless it is running the tests, but i can understand that it might not be worth the risk. I'll see what i can come up with for a way around that. Thanks for your help. |
Thank you for understanding, I'm looking at it now. Also last night after your email I started a branch to port httpretty to python 3.3, I just don't have any idea on how long it would take, I hope more people contribute. But also I haven't come up with a porting strategy yet, I ran 2to3 in all python files to have an idea of what the changes will be and it turns out to be more laborious than complicated to accomplish. |
So i don't think we need to go the whole 2to3 route. That converts the whole code base to 3 code and doesn't necessarily leave you will python2 compatability (in my understanding). I see you have your own compat.py file - it might we worth looking in to using six instead of this. I've found six covers most cases, but we can continue to add things to compat as needed but six is a very common dependencies for project supporting 2 and 3. I don't have a lot of time but i can help with the 3 port (as shown by the mailing list thread there is some pressure on me here too). Let's create a python 3 bug though rather than discussing everything here. |
If the tests are in the sdist but not in the final installed code, is it enough for the needs of the rpm package? |
I'm actually not sure if/how that would change the outcome. Generally when packaging i've just pulled the egg info from PyPi and packaged from that. Does the sdist get published in that fashion that i can easily download it? If so then sure that's fine, I don't need to install the tests with the code but i need them available to be run at packaging time to verify that the install happened correctly. |
I’m not sure about the contents of egg files, since these formats mix up distribution and installation. I think an egg contains the importable code and the packaging metadata, but not all the extra files that one would want in the sdist (licenses, tests, docs...). I use Debian and know that deb packages are always built from sdists, not eggs, so I did not foresee this issue. sdists can be downloaded from PyPI as easily as eggs. |
then yes that would work fine for me. I can easily run python setup.py bdist as part of the packaging process. @gabrielfalcao: does that perhaps mean that we can push along with some of this cleanup then? |
I assume “python setup.py bdist” is a typo for “python setup.py sdist”? I was talking about sdists. |
@merwok: Actually i'm not sure what i was going for there :) Yes, if all this is included in the sdist then i can easily build and package from that. |
@jamielennox I don't think this patch can be applied on top of master. Could you please re-submit ? It's quite hard to run tox currently. It should be easier once this patch has been merged. Then, I have a dozen pending patches that bring support for Python 3 that I'd like to push :) |
Remove requirements not directly used by the test code. These requirements make it very difficult to determine what is actually a dependency of the library.
Tests should be run against the latest versions of libraries. Initially there was going to be a lower bound on requirements but it is unlikely that a situation will arise where a version is too out of date and can be added back then rather than having arbitrary minimums.
@jamielennox Thank you very much for those patches. I've just pushed them (manually, I don't like GitHub merges since "Merged pull request #xxx" does not make sense outside of GitHub). I've just changed test_recording_calls so that it expects the right version of Tornado - determining what it is at runtime. One can now build Python 2.7 and 3.3 environments by running tox -epy27 and tox -epy33, this will be useful in a near future. |
I've been looking at packaging this in Fedora for a while and have held off because of the dependencies. I was recently speaking to someone who was in the exact same state for Gentoo and figured that it should be fixed.
The series essentially involves: