Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ name: Linting
on:
pull_request:
paths:
- '**.py'
- "**.py"
push:
paths:
- '**.py'
- "**.py"

jobs:
lint:
name: nox -s lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox

- name: Run `nox -s lint`
run: python -m nox -s lint
- name: Run `nox -s lint`
run: python -m nox -s lint

build:
name: Build sdist and wheel
Expand All @@ -39,21 +39,21 @@ jobs:
needs: lint

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"

- name: Install dependencies
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install --upgrade build

- name: Build
run: python setup.py sdist bdist_wheel
- name: Build
run: python -m build

- name: Archive files
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
- name: Archive files
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
61 changes: 28 additions & 33 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
hooks:
- id: mypy
exclude: '^(docs|tasks|tests)|setup\.py'
args: []
- id: mypy
name: mypy for Python 2
exclude: '^(docs|tasks|tests)|setup\.py|noxfile\.py'
args: ['--py2']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
hooks:
- id: mypy
exclude: '^(docs|tasks|tests)|setup\.py'
args: []
- id: mypy
name: mypy for Python 2
exclude: '^(docs|tasks|tests)|setup\.py|noxfile\.py'
args: ["--py2"]

- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black

- repo: https://gitlab.com/PyCQA/flake8
rev: '3.7.8'
hooks:
- id: flake8
additional_dependencies: ['pep8-naming']
# Ignore all format-related checks as Black takes care of those.
args: ['--ignore', 'E2,W5', '--select', 'E,W,F,N']

- repo: https://github.com/mgedmin/check-manifest
rev: '0.39'
hooks:
- id: check-manifest
- repo: https://gitlab.com/PyCQA/flake8
rev: "3.7.8"
hooks:
- id: flake8
additional_dependencies: ["pep8-naming"]
# Ignore all format-related checks as Black takes care of those.
args: ["--ignore", "E2,W5", "--select", "E,W,F,N"]
20 changes: 0 additions & 20 deletions MANIFEST.in

This file was deleted.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@

base_dir = os.path.join(os.path.dirname(__file__), os.pardir)
about = {}
with open(os.path.join(base_dir, "packaging", "__about__.py")) as f:
with open(os.path.join(base_dir, "packaging", "__init__.py")) as f:
exec(f.read(), about)

version = release = about["__version__"]
copyright = about["__copyright__"]
copyright = "2014-2019 Donald Stufft and individual contributors"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg → mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[bdist_wheel]
universal=1

[mypy]
ignore_missing_imports = True

Expand Down
9 changes: 5 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def tests(session):
def coverage(*args):
session.run("python", "-m", "coverage", *args)

# Once coverage 5 is used then `.coverage` can move into `pyproject.toml`.
session.install("coverage<5.0.0", "pretend", "pytest", "pip>=9.0.2")

if "pypy" not in session.python:
Expand Down Expand Up @@ -52,8 +53,8 @@ def lint(session):
session.run("pre-commit", "run", "--all-files")

# Check the distribution
session.install("setuptools", "twine", "wheel")
session.run("python", "setup.py", "--quiet", "sdist", "bdist_wheel")
session.install("build", "twine")
session.run("python", "-m", "build")
session.run("twine", "check", *glob.glob("dist/*"))


Expand Down Expand Up @@ -123,10 +124,10 @@ def release(session):
# Checkout the git tag.
session.run("git", "checkout", "-q", release_version, external=True)

session.install("twine", "setuptools", "wheel")
session.install("build", "twine")

# Build the distribution.
session.run("python", "setup.py", "sdist", "bdist_wheel")
session.run("python", "-m", "build")

# Check what files are in dist/ for upload.
files = sorted(glob.glob("dist/*"))
Expand Down
27 changes: 0 additions & 27 deletions packaging/__about__.py

This file was deleted.

25 changes: 2 additions & 23 deletions packaging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

from .__about__ import (
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__uri__,
__version__,
)

__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
]
"""Core utilities for Python packages"""
__version__ = "20.5.dev0"
34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[build-system]
requires = ["flit_core >=2,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "packaging"
author = "Donald Stufft and individual contributors"
author-email = "donald@stufft.io"
home-page = "https://github.com/pypa/packaging"
description-file = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
requires = ["pyparsing>=2.0.2"]

[tool.flit.metadata.urls]
Documentation = "https://packaging.pypa.io/"
Changelog = "https://packaging.pypa.io/en/latest/changelog.html"
73 changes: 0 additions & 73 deletions setup.py

This file was deleted.