-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1618 from ThomasWaldmann/pyproject-toml
Adopt pyproject.toml
- Loading branch information
Showing
12 changed files
with
193 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[python: **/**.py] | ||
encoding = utf-8 | ||
|
||
[jinja2: **/templates/**.html] | ||
encoding = utf-8 | ||
|
||
[jinja2: **/templates/dictionary.js] | ||
# all JS translatable strings must be defined here for jQuery i18n plugin | ||
encoding = utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ language doesn't exist yet`_. | |
|
||
2. Go to the top directory and execute:: | ||
|
||
python setup.py update_catalog -l <locale> | ||
pybabel update -l <locale> -i src/moin/translations/MoinMoin.pot \ | ||
-d src/moin/translations/ -w 116 | ||
|
||
where locale is the short language descriptor of your desired | ||
language. It should be the name of a folder in MoinMoin/translations. | ||
|
@@ -59,7 +60,7 @@ language doesn't exist yet`_. | |
|
||
4. Save the messages.po file and execute:: | ||
|
||
python setup.py compile_catalog -l <locale> | ||
pybabel compile -l <locale> -d src/moin/translations/ | ||
|
||
|
||
Guidelines for translators | ||
|
@@ -83,7 +84,8 @@ the developers, but ... | |
|
||
1. Initialize a new catalog:: | ||
|
||
python setup.py init_catalog -l <locale> | ||
pybabel init -l <locale> -i src/moin/translations/MoinMoin.pot \ | ||
-d src/moin/translations/ -w 116 | ||
|
||
2. Adjust the ``src/moin/translations/<locale>/LC_MESSAGES/messages.po``. | ||
|
||
|
@@ -139,7 +141,11 @@ string replacement. | |
If you made changes to any gettext() string, please update the .pot file | ||
using:: | ||
|
||
python setup.py extract_messages | ||
pybabel extract -F babel.cfg -o src/moin/translations/MoinMoin.pot \ | ||
-k "_ gettext L_ lazy_gettext N_ ngettext" \ | ||
--msgid-bugs-address "English <[email protected]>" \ | ||
--copyright-holder "Moin Core Team, see http://moinmo.in/MoinCoreTeamGroup" \ | ||
--project "moin" --version "<version>" -w 116 src/ | ||
|
||
Because this sometimes creates large diffs, just because of a | ||
change in line numbers, you can of course use this command sparingly. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
[project] | ||
name = "moin" | ||
dynamic = ["version"] | ||
authors = [{name="Juergen Hermann et al."}] | ||
maintainers = [ | ||
{name="RogerHaase", email="[email protected]"}, | ||
{name="Thomas Waldmann", email="[email protected]"}, | ||
] | ||
description = "MoinMoin is an easy to use, full-featured and extensible wiki software package" | ||
readme = {file="README.rst", content-type="text/x-rst"} | ||
requires-python = ">=3.9" | ||
keywords = ["wiki", "web"] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: End Users/Desktop", | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: Other Audience", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: GNU General Public License (GPL)", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Topic :: Office/Business :: Groupware", | ||
"Topic :: Text Processing :: Markup", | ||
] | ||
license = {text="GNU GPL v2 (or any later version)"} | ||
dependencies = [ | ||
"Babel >= 2.10.0", # internationalization support | ||
"blinker >= 1.5", # event signalling (e.g. for change notification trigger) | ||
"docutils >= 0.18.1", # reST markup processing | ||
"Markdown >= 3.4.1", # Markdown markup processing | ||
"mdx_wikilink_plus >= 1.4.1", # Markdown Wikilinks extension | ||
"Flask < 2.3.0", # micro framework | ||
"Flask-Babel >= 3.0.0", # i18n support | ||
"Flask-Caching >= 1.2.0", # caching support | ||
"Flask-Theme >= 0.3.6", # theme support | ||
"emeraldtree >= 0.10.0", # xml processing | ||
"feedgen == 0.9.*", # Atom feed | ||
"flatland >= 0.8", # form handling | ||
"Jinja2 >= 3.1.0", # template engine | ||
"markupsafe <= 2.2.0", # safe html and xml | ||
"pygments >= 1.4", # src code / text file highlighting | ||
"Werkzeug", # wsgi toolkit | ||
"whoosh >= 2.7.0", # needed for indexed search | ||
"pdfminer.six", # pdf -> text/plain conversion | ||
"passlib >= 1.6.0", # strong password hashing (1.6 needed for consteq) | ||
"setuptools >= 51", # dependency with setuptools_scm | ||
"sqlalchemy < 2.0", # used by sqla store | ||
"XStatic >= 0.0.2", # support for static file pypi packages | ||
"XStatic-Bootstrap == 3.1.1.2", | ||
"XStatic-Font-Awesome >= 6.2.1.0", | ||
"XStatic-CKEditor >= 3.6.1.2", | ||
"XStatic-autosize", | ||
"XStatic-jQuery >= 1.8.2", | ||
"XStatic-jQuery-File-Upload >= 10.31.0", | ||
"XStatic-svg-edit-moin >= 2012.11.15.1", | ||
"XStatic-JQuery.TableSorter >= 2.14.5.1", | ||
"XStatic-Pygments >= 1.6.0.1", | ||
] | ||
|
||
[project.optional-dependencies] | ||
pillow = ["pillow"] # successor to PIL; used by image get for scaling/rotating/etc.; | ||
# requires special libs/header to be installed before it can be compiled successfully | ||
ldap = ["python-ldap"] # used by ldap auth; requires special libs/header | ||
# to be installed before it can be compiled successfully | ||
|
||
[project.urls] | ||
"Homepage" = "https://moinmo.in/" | ||
"Bug Tracker" = "https://github.com/moinwiki/moin/issues" | ||
"Documentation" = "https://moin-20.readthedocs.io/" | ||
"Repository" = "https://github.com/moinwiki/moin" | ||
"Changelog" = "https://github.com/moinwiki/moin/blob/master/docs/changes/CHANGES" | ||
|
||
[project.scripts] | ||
moin = "moin.cli:cli" | ||
|
||
[tool.setuptools] | ||
# See also the MANIFEST.in file. | ||
# We want to install all the files in the package directories... | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
exclude = ["_tests"] | ||
|
||
[tool.setuptools.package-data] | ||
"moin.translations" = ["MoinMoin.pot", "*.po", ] | ||
"moin.static" = ["*", ] | ||
"moin.themes.modernized" = ["*", ] | ||
"moin.themes.basic" = ["*", ] | ||
"moin.themes.topside" = ["*", ] | ||
"moin.themes.topside_cms" = ["*", ] | ||
"moin.templates" = ["*.html", "*.xml", ] | ||
"moin.apps.admin.templates" = ["*.html", ] | ||
"moin.apps.misc.templates" = ["*.html", "*.txt", ] | ||
|
||
[build-system] | ||
requires = ["setuptools", "setuptools_scm[toml] >= 6.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/moin/_version.py" | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = [".git", "_build", "tmp*", "env*", "dlc", "wiki", "support"] | ||
|
||
|
||
[tool.ruff] | ||
line-length = 120 | ||
target-version = "py39" | ||
|
||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
"contrib", | ||
".cache", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".idea", | ||
".ruff_cache", | ||
".tox", | ||
"build", | ||
"dist", | ||
] | ||
|
||
[tool.ruff.lint] | ||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. | ||
select = ["E", "F"] | ||
|
||
ignore = ["F405", "E401", "E402", "E501"] | ||
|
||
# Allow autofix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"] | ||
unfixable = [] | ||
|
||
# Code style violation exceptions: | ||
# please note that the values are adjusted so that they do not cause failures | ||
# with existing code. if you want to change them, you should first fix all | ||
# ruff failures that appear with your change. | ||
[tool.ruff.lint.per-file-ignores] | ||
"scripts/coding_std.py" = ["E713"] | ||
"docs/conf.py" = ["F401"] # sphinx config, automatically generated | ||
"src/moin/utils/SubProcess.py" = ["F401", "F821"] # 3rd party stuff, patched stdlib code | ||
"src/moin/config/default.py" = ["F401", "F403"] | ||
"src/moin/datastructures/__init__.py" = ["F401"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.