Skip to content

Commit

Permalink
Fix setup.py and auto publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ojacques committed Nov 1, 2023
1 parent 0bb98e4 commit 50fe762
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 57 deletions.
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

84 changes: 29 additions & 55 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,70 +1,44 @@
from pathlib import Path
from typing import Union

from setuptools import setup, find_packages
import pathlib

# The directory containing this file
HERE = Path(__file__).parent
here = pathlib.Path(__file__).parent.resolve()

# The text of the README file
README = (HERE / "README.md").read_text()

def load_requirements(requirements_files: Union[Path, list[Path]]) -> list:
"""Helper to load requirements list from a path or a list of paths.
Args:
requirements_files (Path | list[Path]): path or list to paths of requirements
file(s)
Returns:
list: list of requirements loaded from file(s)
"""
out_requirements = []

if isinstance(requirements_files, Path):
requirements_files = [
requirements_files,
]

for requirements_file in requirements_files:
with requirements_file.open(encoding="UTF-8") as f:
out_requirements += [
line
for line in f.read().splitlines()
if not line.startswith(("#", "-")) and len(line)
]

return out_requirements
long_description = (here / "README.md").read_text(encoding="utf-8")

setup(
name='mkdocs-git-committers-plugin-2',
version='2.0.0',
description='An MkDocs plugin to create a list of contributors on the page. The git-committers plugin will seed the template context with a list of github committers and other useful GIT info such as last modified date',
long_description=README,
name="mkdocs-git-committers-plugin-2",
version="2.0.0",
description="An MkDocs plugin to create a list of contributors on the page. The git-committers plugin will seed the template context with a list of github committers and other useful GIT info such as last modified date",
long_description=long_description,
long_description_content_type="text/markdown",
keywords='mkdocs pdf github',
url='https://github.com/ojacques/mkdocs-git-committers-plugin-2/',
author='Byrne Reese, Olivier Jacques',
author_email='[email protected], [email protected]',
license='MIT',
python_requires='>=3.8,<4',
install_requires=load_requirements(HERE / "requirements.txt"),
keywords="mkdocs, plugin, github, committers",
url="https://github.com/ojacques/mkdocs-git-committers-plugin-2/",
author="Byrne Reese, Olivier Jacques",
author_email="[email protected], [email protected]",
license="MIT",
python_requires=">=3.8,<4",
install_requires=[
"mkdocs>=1.0.3",
"requests"
],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11'
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
],
packages=find_packages(),
entry_points={
'mkdocs.plugins': [
'git-committers = mkdocs_git_committers_plugin_2.plugin:GitCommittersPlugin'
"mkdocs.plugins": [
"git-committers = mkdocs_git_committers_plugin_2.plugin:GitCommittersPlugin"
]
}
)

0 comments on commit 50fe762

Please sign in to comment.