Skip to content

Commit 7fbffd4

Browse files
committed
improve dev
1 parent cfe9794 commit 7fbffd4

File tree

10 files changed

+52
-20
lines changed

10 files changed

+52
-20
lines changed

.eggs/README.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.
2+
3+
This directory caches those eggs to prevent repeated downloads.
4+
5+
However, it is safe to delete this directory.
6+

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ matrix:
99
- python: 3.6
1010
env: TOXENV=py36
1111

12-
install: pip install tox
12+
install:
13+
- pip install -r requirements.txt
1314

14-
script: tox
15+
script:
16+
- pytest
1517

1618
notifications:
1719
email: false

MANIFEST.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Include the README
22
include *.md
3+
recursive-include ecapy *
34

45
# Include the license file
56
include LICENSE.txt
67

7-
# Include the data files
8-
recursive-include data *

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
release:
2+
./setup.py sdist && ./setup.py build && twine upload dist/* && git push && git push --tags
3+
4+
build:
5+
./setup.py build
6+
7+
test:
8+
./setup.py build && ./setup.py test
9+
10+
11+
clean:
12+
rm -rf dist/ && rm -rf build/ && rm -rf deps/ && rm ecapy/eca.so && rm -rf ecapy.egg-info
13+

bin/.gitkeep

Whitespace-only changes.

deps/.gitkeep

Whitespace-only changes.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
pytest
1+
pytest
2+
pypandoc

setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[metadata]
2-
license_file = LICENSE.txt
2+
license_file = LICENSE.txt
3+
4+
[aliases]
5+
test=pytest

setup.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
#!/usr/bin/env python3
2-
from setuptools import setup, Extension
3-
from setuptools.command.install import install
2+
from setuptools import setup
3+
from setuptools.command.build_py import build_py
44
from codecs import open
55
import subprocess
66
from os import path
77

88
here = path.abspath(path.dirname(__file__))
99

1010

11-
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
12-
long_description = f.read()
11+
try:
12+
import pypandoc
13+
long_description = pypandoc.convert('README.md', 'rst')
14+
except(IOError, ImportError):
15+
long_description = open('README.md').read()
1316

14-
15-
class Installer(install):
17+
class BuildECA(build_py):
1618
def run(self):
1719
command = "mkdir deps/"
1820
process = subprocess.Popen(command, shell=True)
@@ -26,17 +28,16 @@ def run(self):
2628
process = subprocess.Popen(command, shell=True, cwd="deps/eca")
2729
process.wait()
2830

29-
install.run(self)
31+
build_py.run(self)
3032

3133
setup(
3234
name='ecapy',
3335
description='Evolutionary Centers Algorithm: Module for Python coded in C',
3436
url='https://github.com/jmejia8/ecapy',
35-
version='1.0.0',
37+
version='1.0.1',
3638
license='MIT',
3739

3840
long_description=long_description,
39-
long_description_content_type='text/markdown',
4041

4142
author='Jesus Mejia',
4243
author_email='[email protected]',
@@ -63,13 +64,21 @@ def run(self):
6364
'test': ['coverage'],
6465
},
6566

66-
cmdclass={'install': Installer},
67+
cmdclass={'build_py': BuildECA},
6768
include_package_data=True,
6869

70+
6971
project_urls={
7072
'Bug Reports': 'https://github.com/jmejia8/ecapy/issues',
71-
'Funding': 'https://donate.pypi.org',
72-
'Say Thanks!': 'http://saythanks.io/to/example',
7373
'Source': 'https://github.com/jmejia8/ecapy/',
7474
},
75+
76+
# Test configuration
77+
setup_requires=[
78+
'pytest-runner',
79+
],
80+
81+
tests_require=[
82+
'pytest'
83+
],
7584
)

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ envlist = py{27,34,35,36}
1515

1616
[testenv]
1717
basepython =
18-
py27: python2.7
1918
py34: python3.4
2019
py35: python3.5
2120
py36: python3.6
@@ -30,5 +29,5 @@ commands =
3029
flake8 .
3130
py.test tests
3231
[flake8]
33-
exclude = .tox,*.egg,build,data
32+
exclude = .tox,*.egg,build
3433
select = E,W,F

0 commit comments

Comments
 (0)