From 6e70cf2c921b6aa8964e47ed0acf741e96f79b95 Mon Sep 17 00:00:00 2001 From: Shawn Hartsock Date: Mon, 25 Aug 2014 14:04:07 -0400 Subject: [PATCH 1/6] Compatible version numbers Changes version standard to use `-` character when available. By convention `-` is translated to `.` from now on when the `-` character is prohibited by downstream systems. Closes: https://github.com/vmware/pyvmomi/issues/127 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ecfd71f..d82c04c 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ with open('test-requirements.txt') as f: setup( name='pyvmomi', - version='5.5.0_2014.1', + version='5.5.0-2014.1.1', description='VMware vSphere Python SDK', author='VMware, Inc.', author_email='jhu@vmware.com', From dd490489d865ea07443b2cbc910ee17fdfbdcc71 Mon Sep 17 00:00:00 2001 From: Shawn Hartsock Date: Mon, 25 Aug 2014 14:10:01 -0400 Subject: [PATCH 2/6] Fix Open Source License classification Sets the license field to a real pypi descriptor. closes https://github.com/vmware/pyvmomi/issues/133 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d82c04c..fe5626d 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ setup( url='https://github.com/vmware/pyvmomi', packages=['pyVmomi', 'pyVim'], install_requires=required, - license='Apache', + license='License :: OSI Approved :: Apache Software License', long_description=read('README.md'), classifiers=[ "License :: OSI Approved :: Apache Software License", From be59d9c0ec00d7a52a03fade8d685f3e42f7588f Mon Sep 17 00:00:00 2001 From: Shawn Hartsock Date: Mon, 25 Aug 2014 14:33:55 -0400 Subject: [PATCH 3/6] Fix README to be pypi legible A pypi friendly version of the readme documentation. closes: https://github.com/vmware/pyvmomi/issues/134 --- README.md | 66 --------------------------------------------- README.rst | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 13 +++++++-- 3 files changed, 89 insertions(+), 68 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index afbe0ab..0000000 --- a/README.md +++ /dev/null @@ -1,66 +0,0 @@ -[![Build Status](https://travis-ci.org/vmware/pyvmomi.svg?branch=master)](https://travis-ci.org/vmware/pyvmomi) -[![Downloads](https://pypip.in/download/pyvmomi/badge.png)](https://pypi.python.org/pypi/pyvmomi/) - -pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter. - -Getting Started -================ -To get started, check out the samples project at http://vmware.github.io/pyvmomi-community-samples/ - -* community discussion on IRC freenode.net channels [#pyvmomi and #pyvmomi-dev](http://webchat.freenode.net/?channels=#pyvmomi,#pyvmomi-dev) -* community email is on [nabble](http://pyvmomi.2338814.n4.nabble.com) - -Installing -========== -The master is code that is in development, official releases are tagged and posted to [pypi](https://pypi.python.org/pypi/pyvmomi/). - -* The official release is availabe using pip, just run `pip install pyvmomi`. -* To install the version in [github](https://github.com/vmware/pyvmomi) use `python setup.py develop` for development install or `python setup.py install`. - -Contributing -============ -* Research [open issues](https://github.com/vmware/pyvmomi/issues?q=is%3Aopen+is%3Aissue) -* Follow the [contribution standards](https://github.com/vmware/pyvmomi/wiki/Contributions) -* Coordinate with [other developers](http://webchat.freenode.net/?channels=#pyvmomi,#pyvmomi-dev) on the project. - -Other Languages -=============== -There are other bindings of this API in other languages. See: - -* **vijava** (Java): http://vijava.sourceforge.net/ -* **rbvmomi** (Ruby): https://github.com/vmware/rbvmomi -* **vSphere SDK for Perl** (non-free): https://my.vmware.com/group/vmware/details?downloadGroup=VSP510-SDKPERL-510&productId=285 - -Documentation -============= -For general language neutral documentation of vSphere Management API see: -http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/right-pane.html - -Python Support -============== -* pyVmomi 5.5.0_2014.1 and later support Python 2.6, 2.7, 3.3 and 3.4 -* pyVmomi 5.5.0 and below support Python 2.6 and 2.7 - -Compatibility Policy -==================== -pyVmomi versions are marked **vSphere version** _separator_ **release version**. Pyvmomi maintains minimum backward compatibility -with the previous _four_ releases of *vSphere* and it's own previous four releases. Compatibility with much older versions may -continue to work but will not be actively supported. - -For example, version **v5.5.0**_2014.1 is most compatible with vSphere 5.5, 5.1, 5.0, and 4.1 and was the first release in -2014. Initial releases compatible with a version of vSphere will bare a naked version number of **v5.5.0** indicating that -version of pyVmomi was released simultaneously with the *GA* version of vSphere with the same version number. - -Releases -======== -* [5.1.0](https://github.com/vmware/pyvmomi/tree/v5.1.0) -* [5.5.0](https://github.com/vmware/pyvmomi/tree/v5.5.0) [release notes](https://github.com/vmware/pyvmomi/compare/v5.1.0...v5.5.0) -* [5.5.0_2014.1](https://github.com/vmware/pyvmomi/tree/v5.5.0_2014.1) [release notes](https://github.com/vmware/pyvmomi/compare/v5.5.0...v5.5.0_2014.1) -* Next release in progress [5.5.0_2014.2](https://github.com/vmware/pyvmomi/issues?milestone=2&state=open) - -Related Projects -================ -* Feature Incubator: [pyvmomi-tools](https://github.com/vmware/pyvmomi-tools) -* Samples Project: [pyvmomi-community-samples](https://github.com/vmware/pyvmomi-community-samples) - -Have fun! diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..9dc9935 --- /dev/null +++ b/README.rst @@ -0,0 +1,78 @@ +.. image:: https://travis-ci.org/vmware/pyvmomi.svg?branch=v5.5.0_2014.1 + :target: https://travis-ci.org/vmware/pyvmomi + :alt: Build Status + +.. image:: https://pypip.in/download/pyvmomi/badge.png + :target: https://pypi.python.org/pypi/pyvmomi/ + :alt: Downloads + +pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage +ESX, ESXi, and vCenter. + +Getting Started +================ +To get started, check out the samples project at: + +* http://vmware.github.io/pyvmomi-community-samples/ + +* community discussion on IRC freenode.net channels `#pyvmomi and #pyvmomi-dev `_ + +* community email is on `nabble `_ + +Installing +========== +The master is code that is in development, official releases are tagged and +posted to `pypi `_ + +* The official release is availabe using pip, just run + ``pip install --upgrade pyvmomi``. +* To install the version in `github `_ use + ``python setup.py develop`` for development install or + ``python setup.py install``. + +Contributing +============ +* Research `open issues `_ +* Follow the `contribution standards `_ +* Coordinate with `other developers `_ on the project. + +Documentation +============= +For general language neutral documentation of vSphere Management API see: + +* `vSphere WS SDK API Docs `_ + +Python Support +============== +* pyVmomi 5.5.0-2014.1 and later support Python 2.6, 2.7, 3.3 and 3.4 +* pyVmomi 5.5.0 and below support Python 2.6 and 2.7 + +Compatibility Policy +==================== +pyVmomi versions are marked vSphere_version-release . Pyvmomi maintains minimum +backward compatibility with the previous _four_ releases of *vSphere* and it's +own previous four releases. Compatibility with much older versions may continue +to work but will not be actively supported. + +For example, version v5.5.0-2014.1 is most compatible with vSphere 5.5, 5.1, +5.0, and 4.1 and was the first release in 2014. Initial releases compatible with +a version of vSphere will bare a naked version number of v5.5.0 indicating that +version of pyVmomi was released simultaneously with the *GA* version of vSphere +with the same version number. + +Releases +======== +* `5.5.0-2014.1.1 `_ + release notes https://github.com/vmware/pyvmomi/releases/tag/v5.5.0-2014.1.1 +* `5.5.0-2014.1 `_ + release notes https://github.com/vmware/pyvmomi/releases/tag/v5.5.0-2014.1 +* `5.5.0 `_ +* `5.1.0 `_ + release notes https://github.com/vmware/pyvmomi/releases/tag/v5.1.0 + +Related Projects +================ +* Feature Incubator: pyvmomi-tools https://github.com/vmware/pyvmomi-tools +* Samples Project: https://github.com/vmware/pyvmomi-community-samples + +Have fun! diff --git a/setup.py b/setup.py index fe5626d..b63f564 100644 --- a/setup.py +++ b/setup.py @@ -36,16 +36,25 @@ setup( packages=['pyVmomi', 'pyVim'], install_requires=required, license='License :: OSI Approved :: Apache Software License', - long_description=read('README.md'), + # NOTE: pypi prefers the use of RST to render docs + long_description=read('README.rst'), classifiers=[ "License :: OSI Approved :: Apache Software License", "Development Status :: 5 - Production/Stable", "Environment :: No Input/Output (Daemon)", + "Programming Language :: Python", + "Programming Language :: Python :: 3", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", + "Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Distributed Computing" + "Topic :: System :: Distributed Computing", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS", ], + platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"], test_suite='tests', tests_require= required_for_tests, zip_safe=True From 834692417a8d3c91f3ac5a03142754a6df643d25 Mon Sep 17 00:00:00 2001 From: Shawn Hartsock Date: Mon, 25 Aug 2014 15:23:23 -0400 Subject: [PATCH 4/6] Improve sdist and bdist packaging * Include tests in sdist * Include license and notices in all distributions * Update manifest * Use more conventional file names for licenses, notices, etc. related to https://github.com/vmware/pyvmomi/issues/133 related to https://github.com/vmware/pyvmomi/issues/123 closes: https://github.com/vmware/pyvmomi/issues/139 --- License.txt => LICENSE.txt | 0 MANIFEST.in | 7 ++++--- Notice.txt => NOTICE.txt | 0 setup.py | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) rename License.txt => LICENSE.txt (100%) rename Notice.txt => NOTICE.txt (100%) diff --git a/License.txt b/LICENSE.txt similarity index 100% rename from License.txt rename to LICENSE.txt diff --git a/MANIFEST.in b/MANIFEST.in index 29da0a0..ed784d2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ -include README.md -include requirements.txt -include test-requirements.txt +include README.* +include *.txt +include setup.py +recursive-include tests * recursive-include sample * diff --git a/Notice.txt b/NOTICE.txt similarity index 100% rename from Notice.txt rename to NOTICE.txt diff --git a/setup.py b/setup.py index b63f564..507da16 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,8 @@ setup( packages=['pyVmomi', 'pyVim'], install_requires=required, license='License :: OSI Approved :: Apache Software License', + data_files = [("", ["LICENSE.txt", "NOTICE.txt", "MANIFEST.in", + "setup.py"])], # NOTE: pypi prefers the use of RST to render docs long_description=read('README.rst'), classifiers=[ From d1f371b0a5d4acbf05a2c3d1ad9fe1f6b1598452 Mon Sep 17 00:00:00 2001 From: Shawn Hartsock Date: Mon, 25 Aug 2014 17:42:11 -0400 Subject: [PATCH 5/6] tox support initial tox support addresses: https://github.com/vmware/pyvmomi/issues/131 closes: https://github.com/vmware/pyvmomi/issues/136 --- MANIFEST.in | 1 + README.rst | 8 ++++++++ setup.py | 2 +- test-requirements.txt | 2 -- tox.ini | 6 ++++++ 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 tox.ini diff --git a/MANIFEST.in b/MANIFEST.in index ed784d2..81f690a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include README.* include *.txt include setup.py +include tox.ini recursive-include tests * recursive-include sample * diff --git a/README.rst b/README.rst index 9dc9935..3b00d0e 100644 --- a/README.rst +++ b/README.rst @@ -30,6 +30,14 @@ posted to `pypi `_ ``python setup.py develop`` for development install or ``python setup.py install``. +Testing +======= +Unit tests can be invoked by using the ``tox`` command. You may have to +configure multiple python interpreters so that you can test in all the +environments listed in ``tox.ini`` or you will have to run ``tox`` with the +``-e`` flag to run only in your version of python. For example, if you only +have Python 2.7 then ``tox -e py27`` will limit your test run to Python 2.7. + Contributing ============ * Research `open issues `_ diff --git a/setup.py b/setup.py index 507da16..bdbf133 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ setup( install_requires=required, license='License :: OSI Approved :: Apache Software License', data_files = [("", ["LICENSE.txt", "NOTICE.txt", "MANIFEST.in", - "setup.py"])], + "setup.py", "tox.ini"])], # NOTE: pypi prefers the use of RST to render docs long_description=read('README.rst'), classifiers=[ diff --git a/test-requirements.txt b/test-requirements.txt index c55140b..40c8478 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,2 @@ -contextdecorator -PyYAML>=3.10 testtools>=0.9.34 vcrpy diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0d419a4 --- /dev/null +++ b/tox.ini @@ -0,0 +1,6 @@ +[tox] +envlist = py26,py27,py33,py34 +[testenv] +deps = -rtest-requirements.txt +commands = + python setup.py test From 77ed228b012cbeab03bd4abddbc606b52fc03caf Mon Sep 17 00:00:00 2001 From: Shawn Hartsock Date: Tue, 26 Aug 2014 14:50:28 -0400 Subject: [PATCH 6/6] following pypa example Some minor packaging changes so that pyVmomi more closely emulates the pypa package sample and tutorial as provided by `The Python Packaging Authority` at https://github.com/pypa closes: https://github.com/vmware/pyvmomi/issues/143 --- setup.cfg | 2 ++ setup.py | 46 ++++++++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3c6e79c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index bdbf133..7069e51 100644 --- a/setup.py +++ b/setup.py @@ -30,33 +30,39 @@ setup( name='pyvmomi', version='5.5.0-2014.1.1', description='VMware vSphere Python SDK', + # NOTE: pypi prefers the use of RST to render docs + long_description=read('README.rst'), + url='https://github.com/vmware/pyvmomi', author='VMware, Inc.', author_email='jhu@vmware.com', - url='https://github.com/vmware/pyvmomi', packages=['pyVmomi', 'pyVim'], install_requires=required, license='License :: OSI Approved :: Apache Software License', - data_files = [("", ["LICENSE.txt", "NOTICE.txt", "MANIFEST.in", - "setup.py", "tox.ini"])], - # NOTE: pypi prefers the use of RST to render docs - long_description=read('README.rst'), + data_files = [('', ['LICENSE.txt', 'NOTICE.txt', 'MANIFEST.in', + 'setup.py', 'tox.ini', 'setup.cfg'])], classifiers=[ - "License :: OSI Approved :: Apache Software License", - "Development Status :: 5 - Production/Stable", - "Environment :: No Input/Output (Daemon)", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Intended Audience :: Information Technology", - "Intended Audience :: System Administrators", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Distributed Computing", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: Unix", - "Operating System :: MacOS", + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: Apache Software License', + 'Intended Audience :: Information Technology', + 'Intended Audience :: System Administrators', + 'Intended Audience :: Developers', + 'Environment :: No Input/Output (Daemon)', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: System :: Distributed Computing', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'Operating System :: Unix', + 'Operating System :: MacOS', ], - platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"], + keywords='pyvmomi vsphere vmware esx', + platforms = ['Windows', 'Linux', 'Solaris', 'Mac OS-X', 'Unix'], test_suite='tests', tests_require= required_for_tests, zip_safe=True