bashlex icon indicating copy to clipboard operation
bashlex copied to clipboard

[request] Ship wheels too

Open henryiii opened this issue 4 years ago • 4 comments

Could you please also include a wheel when releasing bashlex? Only the classic ".egg" is provided, so this triggers a SDist install (I don't think .egg's are used anymore, setuptools-scm is the only other package I know still also providing an egg). See reasons listed here: https://pythonwheels.com for why wheels are nice, even for pure-python packages (faster, better security, pre-generates .pyc's, etc). Thank you!

pip wheel . will make one, or use pip install build && python -m build (may be best with a pyproject.toml too, which is also a good idea, but I think it works in legacy mode for simple packages).

henryiii avatar Dec 23 '20 21:12 henryiii

Cross reference: https://github.com/joerick/cibuildwheel/pull/494, specifically I list reasons to ship a Python wheel in more detail in https://github.com/joerick/cibuildwheel/pull/494#issuecomment-750485674 .

henryiii avatar Dec 23 '20 21:12 henryiii

Hey, I'm happy to do this, but can't spare cycles to change my process. Can you please check https://github.com/idank/bashlex#releasing-a-new-version and let me know what commands need to run instead?

idank avatar Dec 26 '20 18:12 idank

Two possibilities. The simplest one:

Add pip install wheel to your environment. Then either replace or augment bdist_egg with bdist_wheel. You might need to add universal to support Python 2.

The better one:

Add a pyproject.toml (the default one is likely fine), pip install build, and then replace the python setup.py bdist_egg sdist line with python -m build. This will place an sdist and a wheel in /dist. Nothing else is needed and it's easy for anyone to replicate. See https://scikit-hep.org/developer/packaging. I could make a PR to help with this, if you want.

henryiii avatar Jan 02 '21 01:01 henryiii

Hi @idank! Thank you for the bash parser! It will help to us in xonsh project. Please don't kill your project.

I want to tell you how to making release faster with Github Actions:

~1. Register to https://pypi.org/ and create API token.~ 2. Go to repository "Settings" - "Secrets" and add keys PYPI_USERNAME and PYPI_PASSWORD. 3. Click "Actions" link on your Github repository. 4. Click "Set up this workflow" on "Publish Python Package" Action. 5. Commit the config without any changes. 6. Now when you create new Release the Github Actions will publish the xontrib to PyPi automatically. Release status will be in Actions sction.

After this you just need to change the version in setup.py and create a release using Github. The tag will be created and the package will be uploaded to pypi automatically.

anki-code avatar Feb 23 '21 13:02 anki-code