зеркало из
1
0
Форкнуть 0

Updated Release Process (markdown)

Laurent Mazuel 2016-07-07 17:19:42 -07:00
Родитель ecdd24538b
Коммит 945bf32242
1 изменённых файлов: 14 добавлений и 15 удалений

@ -9,17 +9,14 @@ The README.rst for the bundle packages have the exact version of the packages th
/azure-mgmt/README.rst
```
The setup.py for every package has a version.
setup.py of Autorest generated packages extract the version automatically.
These setup.py have to be changed manually if necessary:
```
/azure/setup.py
/azure-common/setup.py
/azure-mgmt/setup.py
/azure-mgmt-common/setup.py
/azure-mgmt-compute/setup.py
/azure-mgmt-network/setup.py
/azure-mgmt-nspkg/setup.py
/azure-mgmt-resource/setup.py
/azure-mgmt-storage/setup.py
/azure-nspkg/setup.py
/azure-servicebus/setup.py
/azure-servicemanagement-legacy/setup.py
@ -30,10 +27,6 @@ Several packages (non-bundle and non-nspkg) expose a `__version__` attribute.
```
/azure-common/azure/common/__init__.py
/azure-mgmt-common/azure/mgmt/common/__init__.py
/azure-mgmt-compute/azure/mgmt/compute/__init__.py
/azure-mgmt-network/azure/mgmt/network/__init__.py
/azure-mgmt-resource/azure/mgmt/resource/__init__.py
/azure-mgmt-storage/azure/mgmt/storage/__init__.py
/azure-servicebus/azure/servicebus/constants.py
/azure-servicemanagement-legacy/azure/servicemanagement/constants.py
```
@ -73,21 +66,27 @@ Check if the following page needs an update: [https://github.com/Microsoft/PTVS/
## Build
To build all the packages:
To build all the packages in a dist folder:
```
./Build.ps1
python .\setup.py sdist --formats zip -d ../dist
python .\setup.py bdist_wheel -d ../dist/wheelhouse
```
This will create the source distribution files in the `/dist` folder and the wheel files in the `/dist/wheelhouse` folder.
If you get an general error when creating the wheel, make sure that your `setup.py` files don't have a Unicode BOM.
This script currently requires Python 3.4 and `wheel` to work.
This requires `wheel` to work.
You have to erase every `zip` and `whl` which are not modified by this release or you will get an error from Pypi.
## Python Package Index
If it's the first time the package is made, call this from the package folder:
```
python .\setup.py register
```
Once you've uploaded to PyPI, there's no way to overwrite the package. In case of problems, you'll need to increment the version number. To make sure everything works fine, upload and then test installing from the test server first. Make sure you install the dependencies manually, as they won't be present on the test server.
### Pip Cache
@ -97,7 +96,7 @@ Beware of the pip cache! If you see a message like this while testing installat
Using cached azure_storage-0.20.0-py2.py3-none-any.whl
```
Then delete the %localappdata%/pip folder and test again.
Then delete the %localappdata%/pip folder and test again or use the `--no-cache-dir` option.
### Test server
@ -112,8 +111,8 @@ password = <yourpassword>
To upload to the test server:
```
c:\python34\scripts\twine upload -r test dist\*.zip
c:\python34\scripts\twine upload -r test dist\wheelhouse\*.whl
twine upload -r test dist\*.zip
twine upload -r test dist\wheelhouse\*.whl
```
Make sure you already have the non-azure dependencies installed, otherwise they may not be found on the test server. Don't install using `--no-deps`, now that the azure package is a bundle of several azure packages, we want to test installation of all of them.