Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit c3858b0

Browse files
committed
Feature/distribution (#1)
* fix MANIFEST * fix setup * fix readme example links * missing file coding * go travis * go travis * go travis * badges * coveralls omit setup * coveralls omit runtests
1 parent aa4d53e commit c3858b0

File tree

7 files changed

+60
-12
lines changed

7 files changed

+60
-12
lines changed

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[report]
2+
omit =
3+
build_examples.py
4+
runtests.py
5+
setup.py

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: python
2+
3+
# Need +gcc4.8
4+
sudo: required
5+
dist: trusty
6+
7+
# Use container-based infrastructure
8+
# sudo: false
9+
10+
python:
11+
- "3.4"
12+
- "3.5"
13+
14+
install:
15+
- pip install --upgrade pip
16+
- pip install -r requirements.txt
17+
- pip install coveralls
18+
script:
19+
- python ./runtests.py
20+
- coverage run --source=. runtests.py
21+
after_success:
22+
- coveralls

MANIFEST.in

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
recursive-include react *
1+
include MANIFEST.in
22
include LICENSE
33
include README.md
4+
include CHANGELOG.md
45
include requirements.txt
6+
7+
graft react
8+
graft tests
9+
graft docs
10+
11+
prune docs/_build
12+
13+
global-exclude __pycache__
14+
global-exclude *.py[co]
15+
global-exclude .git*
16+
global-exclude .DS_Store

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Python-React-V8
22

3+
[![Build Status](https://img.shields.io/travis/nitely/python-react-v8.svg?style=flat-square)](https://travis-ci.org/nitely/python-react-v8)
4+
[![Coverage Status](https://img.shields.io/coveralls/nitely/python-react-v8.svg?style=flat-square)](https://coveralls.io/r/nitely/python-react-v8)
5+
[![pypi](https://img.shields.io/pypi/v/python-react-v8.svg?style=flat-square)](https://pypi.python.org/pypi/python-react-v8)
6+
[![licence](https://img.shields.io/pypi/l/python-react-v8.svg?style=flat-square)](https://raw.githubusercontent.com/nitely/python-react-v8/master/LICENSE)
7+
38
Thin wrapper around [v8-cffi](https://github.com/nitely/v8-cffi) to render React views server-side.
49

510

@@ -47,8 +52,8 @@ Read the [docs](http://python-react-v8.readthedocs.org/en/latest/).
4752

4853
## Examples
4954

50-
* [Flux](https://github.com/nitely/python-react-v8/tree/master/example/flux)
51-
* [Simple](https://github.com/nitely/python-react-v8/tree/master/example/simple)
55+
* [Flux](https://github.com/nitely/python-react-v8/tree/master/examples/flux)
56+
* [Simple](https://github.com/nitely/python-react-v8/tree/master/examples/simple)
5257

5358

5459
## License

react/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
13
from .react import React, set_up
24
from . import utils
35

46
__all__ = [
57
'set_up',
68
'React',
79
'utils']
10+
11+
__version__ = '0.1.0'

runtests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

44
import unittest

setup.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
import os
55
from setuptools import setup, find_packages
66

7+
# allow setup.py to be run from any path
8+
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
79

8-
README = open(
9-
os.path.join(os.path.dirname(__file__), 'README.md'),
10-
encoding='utf-8').read()
1110
REQUIREMENTS = open(
1211
os.path.join(os.path.dirname(__file__), 'requirements.txt'),
1312
encoding='utf-8').read()
14-
15-
# allow setup.py to be run from any path
16-
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
13+
VERSION = __import__('react').__version__
14+
URL = 'https://github.com/nitely/python-react-v8'
15+
README = "For more info, go to: %s" % URL
1716

1817
setup(
1918
name='python-react-v8',
20-
version='0.1.0',
19+
version=VERSION,
2120
description='Thin wrapper around v8-cffi to render React views server-side.',
2221
author='Esteban Castro Borsani',
2322
author_email='ecastroborsani@gmail.com',
2423
long_description=README,
25-
url='https://github.com/nitely/python-react-v8',
24+
url=URL,
2625
packages=find_packages(exclude=['examples']),
2726
test_suite="runtests.start",
2827
zip_safe=False,
28+
include_package_data=True,
2929
install_requires=REQUIREMENTS,
3030
setup_requires=REQUIREMENTS,
3131
license='MIT License',

0 commit comments

Comments
 (0)