mercurial - producing a installable python module using hg archive vs wheel -


i wonder if release python modules using:

  1. hg archive , sourceforge download
  2. wheel , pypy hosting

i using 1 years now, think right pythonic way 2

any piece of advice ?

wheel requires pip, wheel, setuptools... looks quite complicated simple module compared simple tar extract , setup.py install. on other hand, seems pip/wheel being required?

it's quite simple.

and yes python wheels recommended approach going forward use of pip install , maintain installations of packages.

example: (packaging module)

  1. create setup.py:
  2. install wheel
  3. register , upload pypi

example:

setup.py:

from setuptools import setup, find_packages  setup(     name="mypackage",     version="0.0.1",     description="my description",     long_description=open("readme.rst", "r").read(),     author="you",     author_email="your email address",     packages=find_packages("."), ) 

note: bare minimum example of setup.py. see writing setup script more infirmation other "metadata" can include.

install wheel can build wheels:

$ pip install wheel 

register , upload proejct/module pypi:

$ python setup.py bdist_wheel register upload 

i recommend have read of python packaging user guide


also if not have [pip]1[] installed can eaisly using bootstrap script (as long have python isntalled):

$ python <(curl -q -o https://bootstrap.pypa.io/get-pip.py) 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -