Skip to content

Commit

Permalink
Merge pull request #102 from beetbox/flit
Browse files Browse the repository at this point in the history
Switch to flit
  • Loading branch information
sampsyo committed Jun 27, 2020
2 parents 7afa824 + ba3ca98 commit ba47c6a
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 152 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: '${{ matrix.os }}: ${{ matrix.tox-env }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
tox-env: [py27-test, py35-test, py36-test,
py37-test, py38-test, pypy-test]
os: [ubuntu-latest, windows-latest]

# Only test on a couple of versions on Windows.
exclude:
- os: windows-latest
tox-env: py35-test
- os: windows-latest
tox-env: py36-test
- os: windows-latest
tox-env: py37-test
- os: windows-latest
tox-env: pypy-test

# Python interpreter versions. :/
include:
- tox-env: py27-test
python: 2.7
- tox-env: py35-test
python: 3.5
- tox-env: py36-test
python: 3.6
- tox-env: py37-test
python: 3.7
- tox-env: py38-test
python: 3.8
- tox-env: pypy-test
python: pypy3

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox
run: pip install tox
- name: Tox
run: tox -e ${{ matrix.tox-env }}

style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: TrueBrain/actions-flake8@master
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

5 changes: 5 additions & 0 deletions confuse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""Painless YAML configuration.
"""

from __future__ import division, absolute_import, print_function

__version__ = '1.3.0'

from .exceptions import * # NOQA
from .util import * # NOQA
from .yaml_util import * # NOQA
Expand Down
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["flit_core >=2,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "confuse"
author = "Adrian Sampson"
author-email = "adrian@radbox.org"
home-page = "https://github.com/beetbox/confuse"
requires = [
"pyyaml"
]
description-file = "README.rst"
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4"
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
]

[tool.flit.metadata.requires-extra]
test = [
"pathlib; python_version == '2.7'"
]
99 changes: 0 additions & 99 deletions setup.py

This file was deleted.

7 changes: 6 additions & 1 deletion test/test_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
'Linux': [{'HOME': '/home/test', 'XDG_CONFIG_HOME': '~/xdgconfig'},
posixpath],
'Darwin': [{'HOME': '/Users/test'}, posixpath],
'Windows': [{'APPDATA': '~\\winconfig', 'HOME': 'C:\\Users\\test'}, ntpath]
'Windows': [{
'APPDATA': '~\\winconfig',
'HOME': 'C:\\Users\\test',
'USERPROFILE': 'C:\\Users\\test',
}, ntpath]
}


Expand All @@ -41,6 +45,7 @@ def setUp(self):
if self.TMP_HOME:
self.home = tempfile.mkdtemp()
os.environ['HOME'] = self.home
os.environ['USERPROFILE'] = self.home

def tearDown(self):
platform.system, os.environ, os.path = DEFAULT
Expand Down
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

[tox]
envlist = py{27,34,35,36,37,38}-test, py27-flake8, docs
isolated_build = True

[tox:.package]
basepython = python3

[_test]
deps =
Expand All @@ -20,7 +24,7 @@ deps =
flake8
flake8-future-import
pep8-naming
files = example confuse test setup.py docs
files = example confuse test docs

[testenv]
passenv =
Expand Down

0 comments on commit ba47c6a

Please sign in to comment.