Skip to content

Commit b064f42

Browse files
committed
Merge pull request #438 from basho/fixes/lrb/fix-pypi-documentation
Use pandoc to convert md to rst
2 parents 3d8ca03 + 827787f commit b064f42

4 files changed

Lines changed: 21 additions & 11 deletions

File tree

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ include docs/*
22
include riak/erl_src/*
33
include README.md
44
include LICENSE
5-
include RELEASE_NOTES.md
5+
include RELNOTES.md
66
include version.py
77
include commands.py

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
.PHONY: pb_clean pb_compile pb_build release
1+
.PHONY: pb_clean pb_compile pb_build release release_sdist
2+
3+
PANDOC_VERSION := $(shell pandoc --version)
24

35
clean: pb_clean
46

@@ -12,17 +14,20 @@ pb_compile: pb_clean
1214
@python setup.py build_messages
1315

1416
release_sdist:
17+
ifeq ($(PANDOC_VERSION),)
18+
$(error The pandoc command is required to correctly convert README.md to rst format)
19+
endif
1520
ifeq ($(RELEASE_GPG_KEYNAME),)
1621
$(error RELEASE_GPG_KEYNAME must be set to build a release and deploy this package)
17-
else
22+
endif
23+
@python -c 'import pypandoc'
1824
@echo "==> Python (sdist release)"
1925
@python setup.py sdist upload -s -i $(RELEASE_GPG_KEYNAME)
20-
endif
2126

2227
release: release_sdist
2328
ifeq ($(RELEASE_GPG_KEYNAME),)
2429
$(error RELEASE_GPG_KEYNAME must be set to build a release and deploy this package)
25-
else
30+
endif
2631
@echo "==> Python 2.7 (release)"
2732
@python2.7 setup.py build --build-base=py-build/2.7 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
2833
@echo "==> Python 3.3 (release)"
@@ -31,4 +36,3 @@ else
3136
@python3.4 setup.py build --build-base=py-build/3.4 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
3237
@echo "==> Python 3.5 (release)"
3338
@python3.5 setup.py build --build-base=py-build/3.5 bdist_egg upload -s -i $(RELEASE_GPG_KEYNAME)
34-
endif

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Python Client for Riak
44
Documentation
55
=============
66

7-
[Documentation for the Riak Python Client Library](http://basho.github.io/riak-python-client/index.html) is available here. The documentation source is found in [`docs/` subdirectory](https://github.com/basho/riak-python-client/tree/master/docs) and can be built with [Sphinx](http://sphinx.pocoo.org/).
7+
[Documentation for the Riak Python Client Library](http://basho.github.io/riak-python-client/index.html) is available [here](http://basho.github.io/riak-python-client/index.html).
88

99
Documentation for Riak is available [here](http://docs.basho.com/riak/latest).
1010

@@ -52,7 +52,7 @@ To setup the default test configuration build a test Riak node (from a `riak` di
5252
make rel
5353
```
5454

55-
See [Basic Cluster Setup](http://docs.basho.com/riak/2.0.0/ops/building/basic-cluster-setup/) for more details.
55+
See [Basic Cluster Setup](http://docs.basho.com/riak/latest/ops/building/basic-cluster-setup/) for more details.
5656

5757
For all of the simple default values, set the `RIAK_DIR` environment variable to the root of your Riak installation. Then from the `riak-python-client` directory
5858

@@ -129,14 +129,14 @@ To enable the timeseries tests, set the `RUN_TIMESERIES` environment variable to
129129
Testing Secondary Indexes
130130
-------------------------
131131

132-
To test [Secondary Indexes](http://docs.basho.com/riak/2.0.0/dev/using/2i/), the `RUN_INDEXES` environment variable must be set to 1 (or 0 to skip them.)
132+
To test [Secondary Indexes](http://docs.basho.com/riak/latest/dev/using/2i/), the `RUN_INDEXES` environment variable must be set to 1 (or 0 to skip them.)
133133

134134
Testing Security (Riak 2+)
135135
--------------------------
136136

137137
Ensure that the hostname `riak-test` resolves to your Riak host (most likely `localhost`). This is so the SSL host verification can succeed.
138138

139-
By default [Security](http://docs.basho.com/riak/2.0.0beta1/ops/running/authz/) is not enabled on Riak. Once `security = on` is configured in the `riak.conf` file it can be enabled with `riak-admin`.
139+
By default [Security](http://docs.basho.com/riak/latest/ops/running/authz/) is not enabled on Riak. Once `security = on` is configured in the `riak.conf` file it can be enabled with `riak-admin`.
140140

141141
To run the tests
142142

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@
1818
install_requires.append('python3_protobuf >=2.4.1, <2.6.0')
1919
requires.append('python3_protobuf(>=2.4.1, <2.6.0)')
2020

21-
2221
tests_require = []
2322
if platform.python_version() < '2.7.0':
2423
tests_require.append("unittest2")
2524

25+
try:
26+
import pypandoc
27+
long_description = pypandoc.convert('README.md', 'rst')
28+
except(IOError, ImportError):
29+
long_description = open('README.md').read()
30+
2631
setup(
2732
name='riak',
2833
version=get_version(),
@@ -32,6 +37,7 @@
3237
tests_require=tests_require,
3338
package_data={'riak': ['erl_src/*']},
3439
description='Python client for Riak',
40+
long_description=long_description,
3541
zip_safe=True,
3642
options={'easy_install': {'allow_hosts': 'pypi.python.org'}},
3743
include_package_data=True,

0 commit comments

Comments
 (0)