Skip to content

Commit

Permalink
Update package for Pypi uploads, add development docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Friedrich committed Dec 15, 2017
1 parent fba36b6 commit e3b3cc8
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 18 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ Example order:

## Installation

https://pypi.python.org/pypi/pretix-invoice-net

### pip

```
pip install pretix-invoice-net
```

### Manual installation

```
cp -rv pretix-invoice-net/* /usr/src/pretix-invoice-net/
pip3 install /usr/src/pretix-invoice-net/
```

Future plans involve publishing on pypi.python.org

## Configuration

Navigate into the admin control panel and choose your event.
Expand Down Expand Up @@ -45,11 +53,6 @@ Invoice renderer is inspired by [upstream](https://github.com/pretix/pretix/blob
6. Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the 'plugins' tab in the settings.

### Create release tarball

```
python setup.py sdist
```

# Thanks

Expand Down
76 changes: 76 additions & 0 deletions doc/50-development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Development

## Requirements

### macOS

```
brew install python3 pandoc
```

### Pretix setup

```
python3 -m venv env
source env/bin/activate
pip3 install -U pip setuptools
export CXX=clang++
export CC=clang
cd src/
pip3 install -r requirements.txt -r requirements/dev.txt
```

### Local server

```
cd $HOME/coding/testing/pretix/pretix/src
python manage.py collectstatic --noinput
python manage.py makemigrations
python manage.py migrate
python make_testdata.py
python manage.py runserver
```

http://127.0.0.1:8000/control admin@localhost - admin

## Plugin setup

```
cd $HOME/coding/netways/pretix/pretix
source env/bin/activate
cd $HOME/coding/netways/pretix/pretix-invoice-net
```

```
python3 setup.py develop
```

## Plugin Release

### Create release


```
VERSION=0.0.1
git tag -u D14A1F16 -m "Version $VERSION" v$VERSION
```

```
python3 setup.py sdist
```

### PyPi Upload

#### Test

```
python setup.py sdist upload -r testpypi
```

#### Release

```
python setup.py sdist upload -r pypi
```
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[metadata]
description-file = README.md

[flake8]
ignore = N802,W503,E402
max-line-length = 160
Expand Down
26 changes: 15 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

from setuptools import setup, find_packages

# pypi doesn't like markdown, it needs RST.
# https://stackoverflow.com/questions/26737222/pypi-description-markdown-doesnt-work
try:
with open(os.path.join(os.path.dirname(__file__), 'README.md'), encoding='utf-8') as f:
long_description = f.read()
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except:
long_description = ''
long_description = open('README.md').read()

setup(
name='pretix-invoice-net',
version='0.0.1',
description='Pretix invoice renderer plugin for NETWAYS',
long_description=long_description,
url='https://github.com/NETWAYS/pretix-invoice-net',
author='NETWAYS GmbH',
author_email='support@netways.de',
license='Apache Software License',
name = 'pretix-invoice-net',
version = '0.0.1',
description = 'Pretix invoice renderer plugin for NETWAYS',
long_description = long_description,
url = 'https://github.com/NETWAYS/pretix-invoice-net',
download_url = 'https://github.com/NETWAYS/pretix-invoice-net/archive/v0.0.1.tar.gz',
keywords = [ 'pretix', 'tickets', 'events', 'invoice', 'pdf' ],
author = 'NETWAYS GmbH',
author_email = 'support@netways.de',
license = 'Apache Software License',

# pretix already depends on invoice related packages (reportlab, etc.)
install_requires=[],
Expand Down

0 comments on commit e3b3cc8

Please sign in to comment.