idank / bashlex

Python parser for bash
GNU General Public License v3.0
550 stars 94 forks source link

[request] Ship wheels too #58

Open henryiii opened 3 years ago

henryiii commented 3 years ago

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 commented 3 years ago

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 .

idank commented 3 years ago

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?

henryiii commented 3 years ago

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.

anki-code commented 3 years ago

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.~

  1. Go to repository "Settings" - "Secrets" and add keys PYPI_USERNAME and PYPI_PASSWORD.
  2. Click "Actions" link on your Github repository.
  3. Click "Set up this workflow" on "Publish Python Package" Action.
  4. Commit the config without any changes.
  5. 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.