Closed ntoll closed 8 years ago
It's a pain that it's not possible to specify platform-specific dependencies in requirements.txt
Looks like we're missing at least mock and builtins (from the future
distribution) that could easily be specified as a dependency for pip to fetch, but it would be annoying to clutter up a python3 install with them unnecessarily...
What do you think about creating a separate requirements file for python2?
https://github.com/funkyHat/uflash/tree/python2 Not quite working yet, the hex output is subtly different. The only tests that are failing are test_unhexlify and test_extract, but they are failing because the output from hexlify is different.
Perhaps we need more tests to ensure the output from hexlify is correct?
(The actual difference is an extraneous 4
on a line on its own at the end of the embedded python script (at least for our current TESTSCRIPT :) :) ) so it wouldn't actually break anything << )
There's a new requirements file just for python 2, can setuptools be configured to grab dependencies from there too if it's on python 2?
I found a nice solution to this: https://caremad.io/2013/07/setup-vs-requirement/ requirements.txt can contain a line like '-e .' and it will look for dependencies inside setup.py. That allows me to check the python version there and just feels neater overall :)
Nice spot! ;-)
The problem I have now is Python 2 is resisting my efforts to mock open
... (and still the problem where hexlify
is generating subtly different output)
Ah. Apparently I should have put "fixes #4" instead of "fixes issue #4" in order for github to automatically close this :)
This issue can be closed now? I'm adding tox and travis-ci so we can be sure it's still working on Python 2.7, (and 3.3, 3.4, 3.5).
Yep :)
What it says on the tin.