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
56 changes: 56 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Generated from:
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*]
# Default settings for all files.
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml,zcml,html,xml}]
# 2 space indentation
indent_size = 2

[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}]
# Frontend development
# 2 space indentation
indent_size = 2
max_line_length = 80

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset


##
# Add extra configuration options in .meta.toml:
# [editorconfig]
# extra_lines = """
# _your own configuration lines_
# """
##
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
doctests = 1
ignore =
# black takes care of line length
E501,
# black takes care of where to break lines
W503,
# black takes care of spaces within slicing (list[:])
E203,
# black takes care of spaces after commas
E231,
9 changes: 9 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ on:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Run code quality checks
run: pipx run pre-commit run -a

test:
runs-on: ubuntu-latest
strategy:
Expand Down
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ci:
autofix_prs: false
autoupdate_schedule: monthly

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/pycqa/isort
rev: 9.0.0b1
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.5.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/mgedmin/check-manifest
rev: "0.51"
hooks:
- id: check-manifest
- repo: https://github.com/regebro/pyroma
rev: "5.1b1"
hooks:
- id: pyroma
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.24.2"
hooks:
- id: check-python-versions
args: ['--only', 'setup.py,tox.ini']
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include *.rst
include *.ini
23 changes: 17 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
[build-system]
# We still support older Pythons, and that means it is better to use an
# older setuptools to create the distributions.
# requires = ["setuptools<69"]
# But with such an old version, I get a BadRequest error when uploading to PyPI:
# Filename 'mr.developer-2.1.0.tar.gz' is invalid, should be 'mr_developer-2.1.0.tar.gz'.
# So require a newer one.
requires = ["setuptools>=75.3.2"]
build-backend = "setuptools.build_meta"

[tool.black]
target-version = ["py310"]

[tool.check-manifest]
ignore = [
".editorconfig",
".flake8",
".pre-commit-config.yaml",
"tox.ini",
"build_git.sh",
"buildout.cfg",
]

[tool.isort]
profile = "plone"
13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

97 changes: 50 additions & 47 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
from setuptools import setup


version = '3.0.0.dev0'
version = "3.0.0.dev0"


install_requires = [
'setuptools',
'zc.buildout',
"setuptools",
"zc.buildout",
]

tests_require = [
'mock']
tests_require = ["mock"]

extras_require = {
'test': tests_require}
extras_require = {"test": tests_require}


def get_text_from_file(fn):
text = open(fn, 'rb').read()
return text.decode('utf-8')
text = open(fn, "rb").read()
return text.decode("utf-8")


setup(name='mr.developer',
version=version,
description="A zc.buildout extension to ease the development of large projects with lots of packages.",
long_description="\n\n".join([
get_text_from_file("README.rst"),
get_text_from_file("HELP.rst"),
get_text_from_file("CHANGES.rst")]),
# Get more strings from https://pypi.org/classifiers/
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Framework :: Buildout",
"Topic :: Software Development :: Libraries :: Python Modules"],
keywords='buildout extension vcs git develop',
author='Florian Schulze',
author_email='florian.schulze@gmx.net',
url='https://github.com/fschulze/mr.developer',
license='BSD',
packages=['mr', 'mr.developer', 'mr.developer.tests'],
package_dir={'': 'src'},
namespace_packages=['mr', 'mr.developer'],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require=extras_require,
python_requires=">=3.10",
test_suite='mr.developer.tests',
entry_points="""
setup(
name="mr.developer",
version=version,
description="A zc.buildout extension to ease the development of large projects with lots of packages.",
long_description="\n\n".join(
[
get_text_from_file("README.rst"),
get_text_from_file("HELP.rst"),
get_text_from_file("CHANGES.rst"),
]
),
# Get more strings from https://pypi.org/classifiers/
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Framework :: Buildout",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="buildout extension vcs git develop",
author="Florian Schulze",
author_email="florian.schulze@gmx.net",
url="https://github.com/fschulze/mr.developer",
license="BSD",
packages=["mr", "mr.developer", "mr.developer.tests"],
package_dir={"": "src"},
namespace_packages=["mr", "mr.developer"],
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
extras_require=extras_require,
python_requires=">=3.10",
test_suite="mr.developer.tests",
entry_points="""
[console_scripts]
develop = mr.developer.develop:develop
[zc.buildout.extension]
Expand Down Expand Up @@ -84,4 +86,5 @@ def get_text_from_file(fn):
reset = mr.developer.commands:CmdReset
status = mr.developer.commands:CmdStatus
update = mr.developer.commands:CmdUpdate
""")
""",
)
3 changes: 2 additions & 1 deletion src/mr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)
3 changes: 2 additions & 1 deletion src/mr/developer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)
Loading