3 ms·
About PyPI, it is a bit messy. I backported a py3 project to use py2 (on behalf of a few users) and it was a real pain in the ass to have a wheel that allowed
by zzleeper 10y ago
About PyPI, it is a bit messy.
I backported a py3 project to use py2 (on behalf of a few users) and it was a real pain in the ass to have a wheel that allowed for both versions.
I ended up having a py3 build on github, and using a TravisCI build that ran pasteurize and pushed to PyPI that version. At this point, I don't even know what the travis.yml file is doing (100 lines), and regret a bit backporting the project.
- slavik81 10y agoWhat makes it difficult? My projects are all quite simple, but I do keep them compatible with both Python 2 and Python 3. All I had to do was create a setup.cfg that said: [wheel] universal = 1 To build, I use: python setup.py sdist bdist_wheel twine upload -s dist/* The .travis.yml is just 7 lines. https://github.com/cgmb/guardonce/blob/v2.0.0/.travis.yml https://github.com/cgmb/guardonce/blob/v2.0.0/.travis.yml
- zzleeper 10y agoAre you using py3 exclusive features? If you are not, then you are not really using python 3 (tuple unpacking, etc.) If you want to do both, then you need pasteurize, and end up with a travis mess: https://github.com/sergiocorreia/panflute/blob/master/.travis.yml https://github.com/sergiocorreia/panflute/blob/master/.travi... To be honest, for me the morale of the story is that supporting py2 is just not worth it. I am not going to use it, so why support it at all?
- slavik81 10y agoInteresting. I do stick to Python 2 features, but put in some work to ensure my programs are valid Python 3. I'm not a very skilled Python developer, so the simplicity of that strategy is attractive. One thing that I notice is that your project is a library, while mine is a program. I wonder if that also plays a role.