Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Allow package_data files to not have an extension #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,48 @@
name: dephell_discover

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

jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- pypy3
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v2
- name: Run DepHell
uses: dephell/dephell_action@master

linters:
runs-on: ubuntu-latest
strategy:
matrix:
dephell-env:
- flake8
- typing
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Checkout
uses: actions/checkout@v2
- name: Run DepHell
uses: dephell/dephell_action@master
with:
dephell-env: ${{ matrix.dephell-env }}
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# Dephell Discover

[![travis](https://travis-ci.org/dephell/dephell_discover.svg?branch=master)](https://travis-ci.org/dephell/dephell_discover)
![GitHub Actions Master branch](https://github.com/dephell/dephell_discover/workflows/dephell_discover/badge.svg?branch=master)
[![appveyor](https://ci.appveyor.com/api/projects/status/github/dephell/dephell_discover?svg=true)](https://ci.appveyor.com/project/orsinium/dephell-discover)
[![MIT License](https://img.shields.io/pypi/l/dephell-discover.svg)](https://github.com/dephell/dephell_discover/blob/master/LICENSE)

Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Expand Up @@ -5,13 +5,6 @@ build: false

environment:
matrix:
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.x"
ARCH: "64"
WINDOWS_SDK_VERSION: "v7.1"
PLAT_NAME: "win-amd64"
PY_TAG: "cp35"

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
ARCH: "64"
Expand All @@ -26,6 +19,13 @@ environment:
PLAT_NAME: "win-amd64"
PY_TAG: "cp37"

- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
ARCH: "64"
WINDOWS_SDK_VERSION: "v7.1"
PLAT_NAME: "win-amd64"
PY_TAG: "cp38"

init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

Expand Down
2 changes: 1 addition & 1 deletion dephell_discover/__init__.py
Expand Up @@ -9,7 +9,7 @@
from ._root import Root


__version__ = '0.2.10'
__version__ = '0.2.11'
__author__ = 'Gram (@orsinium)'
__license__ = 'MIT'

Expand Down
6 changes: 3 additions & 3 deletions dephell_discover/_root.py
Expand Up @@ -65,8 +65,8 @@ def data(self) -> Set[Data]:
for path in self.path.glob('**/*'):
if not self.include(path=path):
continue
# skip dirs, python files and files without extension
if not path.is_file() or path.suffix in ('.py', ''):
# skip dirs and python files
if not path.is_file() or path.suffix in ('.py', ):
continue
data = self._make_data(path=path.parent, ext=path.suffix)
if data is not None:
Expand Down Expand Up @@ -105,7 +105,7 @@ def include(self, path: Path) -> bool:

def _make_data(self, path: Path, ext: str) -> Optional[Data]:
paths = {package.path for package in self.packages}
for parent in chain((path,), path.parents):
for parent in chain((path, ), path.parents):
if parent not in paths:
continue
package = Package(path=parent, root=self.path, module=self._get_module_name(parent))
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
@@ -1,6 +1,7 @@
[tool.dephell.main]
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "setuppy", path = "setup.py"}
tag = "v."

[tool.dephell.flake8]
from = {format = "pip", path = "requirements-flake.txt"}
Expand All @@ -19,7 +20,7 @@ command = "mypy --ignore-missing-imports --allow-redefinition dephell_discover"

[tool.poetry]
name = "dephell_discover"
version = "0.2.10"
version = "0.2.11"
description = "Find project modules and data files (packages and package_data for setup.py)."
authors = ["Gram <master_fess@mail.ru>"]
readme = "README.md"
Expand All @@ -38,5 +39,5 @@ classifiers = [
]

[tool.poetry.dependencies]
python = ">=3.5"
attrs = "*"
python = ">=3.6"
attrs = "*"
10 changes: 8 additions & 2 deletions requirements-flake.txt
@@ -1,11 +1,10 @@
flake8

flake8-comprehensions # https://github.com/adamchainz/flake8-comprehensions
flake8-alfred # https://github.com/datatheorem/flake8-alfred
flake8-blind-except # https://github.com/elijahandrews/flake8-blind-except
flake8-broken-line # https://github.com/sobolevn/flake8-broken-line
flake8-bugbear # https://github.com/PyCQA/flake8-bugbear
flake8-commas # https://github.com/PyCQA/flake8-commas
flake8-comprehensions # https://github.com/adamchainz/flake8-comprehensions
flake8-debugger # https://github.com/JBKahn/flake8-debugger
flake8-logging-format # https://github.com/globality-corp/flake8-logging-format
flake8-mutable # https://github.com/ebeweber/flake8-mutable
Expand All @@ -14,3 +13,10 @@ flake8-quotes # https://github.com/zheller/flake8-quotes
flake8-tidy-imports # https://github.com/adamchainz/flake8-tidy-imports
flake8-variables-names # https://github.com/best-doctor/flake8-variables-names
pep8-naming # https://github.com/PyCQA/pep8-naming


# flake8-string-format # https://github.com/xZise/flake8-string-format
# disabled: https://github.com/xZise/flake8-string-format/issues/16

# flake8-broken-line # https://github.com/sobolevn/flake8-broken-line
# disabled: https://github.com/sobolevn/flake8-broken-line/issues/38