Skip to content

Commit 7791e4d

Browse files
authored
Merge pull request #1 from dephell/ci
CI and metainfo
2 parents fd9584e + a905e8b commit 7791e4d

20 files changed

+215
-7
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# EditorConfig helps developers define and maintain consistent
3+
# coding styles between different editors and IDEs
4+
# https://editorconfig.org
5+
root = true
6+
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.py]
14+
indent_style = space
15+
indent_size = 4
16+
17+
[*.{ini,toml}]
18+
indent_style = space
19+
indent_size = 4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
__pycache__/
22
.pytest_cache/
3+
/README.rst
4+
/setup.py
5+
*.egg-info
6+
/dist/

.travis.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Config for Travis CI, tests powered by DepHell.
2+
# https://travis-ci.org/
3+
# https://github.com/dephell/dephell
4+
5+
language: python
6+
dist: xenial
7+
8+
# do not run Travis for PR's twice (as for push and as for PR)
9+
branches:
10+
only:
11+
- master
12+
13+
before_install:
14+
# show a little bit more information about environment
15+
- sudo apt-get install -y tree
16+
- env
17+
- tree
18+
# install DepHell
19+
# https://github.com/travis-ci/travis-ci/issues/8589
20+
- curl -L dephell.org/install | /opt/python/3.7/bin/python
21+
- dephell inspect self
22+
install:
23+
- dephell venv create --env=$ENV --python="/opt/python/$TRAVIS_PYTHON_VERSION/bin/python"
24+
- dephell deps install --env=$ENV
25+
script:
26+
- dephell venv run --env=$ENV
27+
28+
matrix:
29+
include:
30+
31+
- python: "3.5"
32+
env: ENV=pytest
33+
34+
- python: "3.6.7"
35+
env: ENV=pytest
36+
37+
- python: "3.7"
38+
env: ENV=pytest
39+
40+
- python: "3.8-dev"
41+
env: ENV=pytest
42+
43+
- python: "3.7"
44+
env: ENV=flake8

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# dephell_setuptools
2+
3+
Extract meta information from `setup.py`.
4+
5+
Install:
6+
7+
```
8+
python3 -m pip install --user dephell_setuptools
9+
```
10+
11+
CLI:
12+
13+
```
14+
python3 -m dephell_setuptools ./setup.py
15+
```
16+
17+
Lib:
18+
19+
```python
20+
from pathlib import Path
21+
from dephell_setuptools import read_setup
22+
23+
result = read_setup(path=Path('setup.py'))
24+
```

dephell_setuptools/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""Read metainfo from setup.py
2+
"""
3+
# app
14
from ._cfg import CfgReader
25
from ._cmd import CommandReader
36
from ._constants import FIELDS
@@ -6,6 +9,9 @@
69
from ._static import StaticReader
710

811

12+
__version__ = '0.1.1'
13+
14+
915
__all__ = [
1016
'FIELDS',
1117
'read_setup',

dephell_setuptools/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# app
12
from ._cli import main
23

34

dephell_setuptools/_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# built-in
12
from pathlib import Path
23
from typing import Union
34

5+
# app
46
from ._constants import FIELDS
57

68

dephell_setuptools/_cfg.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
from copy import deepcopy
1+
# built-in
22
from configparser import ConfigParser
3+
from copy import deepcopy
34
from pathlib import Path
45
from typing import Dict, List, Optional, Union
56

6-
from setuptools.config import ConfigOptionsHandler, ConfigMetadataHandler
7+
# external
8+
from setuptools.config import ConfigMetadataHandler, ConfigOptionsHandler
79

10+
# app
811
from ._base import BaseReader
912
from ._constants import FIELDS
1013

dephell_setuptools/_cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# built-in
12
import json
23
import sys
34

5+
# app
46
from ._manager import read_setup
57

68

dephell_setuptools/_cmd.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# built-in
12
import json
23
import os
34
import subprocess
@@ -7,6 +8,7 @@
78
from pathlib import Path
89
from tempfile import NamedTemporaryFile
910

11+
# app
1012
from ._base import BaseReader
1113
from ._constants import FIELDS
1214

0 commit comments

Comments
 (0)