bitbucket-distutils

Distribute/setuptools/distutils command for Bitbucket
Download

bitbucket-distutils Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Public Domain
  • Price:
  • FREE
  • Publisher Name:
  • Hong MinHee
  • Publisher web site:
  • http://dirty.googlecode.com/

bitbucket-distutils Tags


bitbucket-distutils Description

bitbucket-distutils is a Python module to distribute/setuptools/distutils command for Bitbucket. You can use Bitbucket downloads instead of PyPI downloads for release.To use this, follow the instruction.InstructionFirst of all your software must be packaged within the standard distribution way: use distutils, Distribute or setuptools. This package contains an extension command for that. Insert the following lines into the head of your setup.py file:try: from bitbucket_distutils import commandsexcept ImportError: commands = {}and then, pass the commands dictionary into your setup() function's cmdclass parameter and specify setup_requires parameter:setup(name='YourPackageName', version='1.2.3', ..., setup_requires=, cmdclass=commands)Now there will be the overwritten upload command for your setup.py:$ python setup.py upload --helpCommon commands: (see '--help-commands' for more)...Options for 'upload' command: --bb-repository (-R) Bitbucket repository name e.g. user/reponame --bb-username (-u) Bitbucket username --bb-password (-p) Bitbucket password...As you can see there are --bb--prefixed options for the command. If -u/--bb-username and --p/--bb-password are not present, it shows the prompt. -R/--bb-repository is required.UploadUpload is very easy:python setup.py sdist upload -R user/reponame registerBy explained:sdist Makes the source distribution file. If your package name is YourPackageName and its version is 1.2.3, and then its file name becomes YourPackageName-1.2.3.tar.gz.upload -R user/reponame Uploads the built source distribution file into your Bitbucket repository. It does not mean that it will be version-controlled, but it will be simply uploaded to its downloads page.register Using the Bitbucket download URL registers the package of this version into PyPI. The URL of PyPI page will be http://pypi.python.org/YourPackageName/1.2.3Defaulting optionsYou can make default values for these options by specifying in the setup.cfg configuration file. For example, if you want to default --bb-repository, make setup.cfg file like (hyphens becomes underscores):bb_repository = user/reponameYou can make a shorthand alias as well:release = sdist upload registerAuthor and licenseIt is distributed under Public Domain. Just do what you do with this. Written by Hong Minhee.You can checkout the source code from its Bitbucket Mercurial repository: hg clone https://bitbucket.org/dahlia/bitbucket-distutilsIf you found a bug, please report it to the issue tracker.Product's homepage


bitbucket-distutils Related Software