Skip to content

Commit 2baec2c

Browse files
authored
Readme update
Update README to markdown
1 parent 7998e17 commit 2baec2c

4 files changed

Lines changed: 32 additions & 22 deletions

File tree

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test_python2:
2727
upload:
2828
stage: upload
2929
script:
30-
- pip install twine wheel babel
30+
- pip install twine wheel babel pypandoc
3131
- python3 setup.py compile_catalog -d pammysqltools/locales
3232
- python3 setup.py sdist bdist_wheel
3333
- twine upload -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD" dist/*

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ python:
77
- '3.5-dev'
88
- 'nightly'
99

10+
sudo: false
11+
1012
cache: pip
1113

1214
services: mysql
1315

16+
addons:
17+
apt:
18+
packages:
19+
- pandoc
20+
1421
install:
22+
- pip install --upgrade coveralls coverage pypandoc
1523
- pip install --upgrade .
16-
- pip install --upgrade coveralls coverage
1724

1825
before_script: mysql -e 'CREATE DATABASE IF NOT EXISTS auth_test;'
1926

README.rst renamed to README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
PAMMySQL Tools
22
==============
33

4-
.. image:: https://travis-ci.org/cperrin88/PAMMySQLTools.svg?branch=master
5-
:target: https://travis-ci.org/cperrin88/PAMMySQLTools
6-
.. image:: https://coveralls.io/repos/github/cperrin88/PAMMySQLTools/badge.svg?branch=master
7-
:target: https://coveralls.io/github/cperrin88/PAMMySQLTools?branch=master
4+
[![build](https://travis-ci.org/cperrin88/PAMMySQLTools.svg?branch=master)](https://travis-ci.org/cperrin88/PAMMySQLTools) [![coverage](https://coveralls.io/repos/github/cperrin88/PAMMySQLTools/badge.svg?branch=master)](https://coveralls.io/github/cperrin88/PAMMySQLTools?branch=master)
85

9-
PAMMySQL Tools ist a suite to manage users for pam_mysql and libnss-mysql. It tries to mimic the behaviours of the linux tools user{add,mod,del} and group{add,mod,del}
6+
PAMMySQL Tools ist a suite to manage users for pam\_mysql and
7+
libnss-mysql. It tries to mimic the behaviours of the linux tools
8+
user{add,mod,del} and group{add,mod,del}
109

1110
Installation
1211
------------
1312

14-
To install simply run::
13+
To install simply run:
1514

1615
pip install PAMMySQLTools
1716

1817
This will install the scripts:
19-
- myuseradd
20-
- myusermod
21-
- myuserdel
22-
- mygroupadd
23-
- mygroupmod
24-
- mygroupdel
18+
19+
- myuseradd
20+
- myusermod
21+
- myuserdel
22+
- mygroupadd
23+
- mygroupmod
24+
- mygroupdel
2525

2626
Configuration
2727
-------------
2828

29-
In the directory :code:`docs` you can find an example config with all everything set. If you don't set a value, the tools will assume the values in the original config as default values.
29+
In the directory `docs` you can find an example config with
30+
all everything set. If you don't set a value, the tools will assume the
31+
values in the original config as default values.
3032

3133
Running the Software
3234
--------------------
3335

3436
To display help for any of the scripts, start with the --help parameter
3537

36-
For example::
38+
For example:
3739

3840
$ myuseradd --help
3941
Usage: myuseradd [OPTIONS] LOGIN

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from setuptools import setup, find_packages
22

3-
4-
def readme():
5-
with open('README.rst') as f:
6-
return f.read()
3+
try:
4+
from pypandoc import convert
5+
read_md = lambda f: convert(f, 'rst')
6+
except ImportError:
7+
read_md = lambda f: open(f, 'r').read()
78

89

910
setup(name='PAMMySQLTools',
@@ -15,9 +16,9 @@ def readme():
1516
url='https://github.com/cperrin88/PAMMySQLTools',
1617
license='MIT',
1718
packages=find_packages(),
18-
long_description=readme(),
19+
long_description=read_md('README.md'),
1920
test_suite='tests',
20-
setup_requires=['setuptools-git-version', 'babel'],
21+
setup_requires=['setuptools-git-version', 'babel', 'pypandoc'],
2122
install_requires=['pymysql', 'click', 'future', 'six', 'configparser>=3.5.0b2'],
2223
entry_points={
2324
'console_scripts': [

0 commit comments

Comments
 (0)