Browse Source

fix Package.get_readme()

shut
Niklas Rosenstein 10 months ago
parent
commit
f5c5cb18b1
No known key found for this signature in database GPG Key ID: 6D269B33D25F6C6
3 changed files with 3 additions and 3 deletions
  1. + 2
    - 1
      src/shore/model.py
  2. + 0
    - 1
      src/shore/plugins/core.py
  3. + 1
    - 1
      src/shore/plugins/setuptools.py

+ 2
- 1
src/shore/model.py

@ -33,6 +33,7 @@ from shore.core.plugins import (
load_plugin,
PluginNotFound)
from shore.mapper import mapper
from shore.plugins._util import find_readme_file
from shore.util.ast import load_module_members
from shore.util.version import bump_version, Version
from typing import Any, Callable, Dict, Iterable, Optional, List, TextIO, Type, Union
@ -811,7 +812,7 @@ class Package(BaseObject):
abs_path = os.path.abspath(os.path.join(self.directory, self.readme))
is_inside = nr.fs.issub(os.path.relpath(abs_path, self.directory))
return Package._PackageReadme(self.readme, is_inside)
filename = find_readme_file(package.directory)
filename = find_readme_file(self.directory)
if filename:
return Package._PackageReadme(filename, True)
return None

+ 0
- 1
src/shore/plugins/core.py

@ -21,7 +21,6 @@
from shore.core.plugins import CheckResult, FileToRender, IPackagePlugin, IMonorepoPlugin, VersionRef
from shore.model import BaseObject, Monorepo, Package, VersionSelector
from shore.plugins._util import find_readme_file
from shore.util.classifiers import get_classifiers
from shore.util.version import Version
from nr.interface import implements, override

+ 1
- 1
src/shore/plugins/setuptools.py

@ -22,7 +22,7 @@
""" A plugin that generates setuptools files (setup.py, MANIFEST.in). This
plugin is used by default in packages. """
from ._util import find_readme_file, readme_content_type
from ._util import readme_content_type
from nr.interface import implements, override
from shore.core.plugins import (
BuildResult,

Loading…
Cancel
Save