Skip to content

Commit

Permalink
fix: fix setup.py rendering for inherit license files
Browse files Browse the repository at this point in the history
fixes #21
  • Loading branch information
NiklasRosenstein committed Aug 10, 2021
1 parent 74ee35d commit d1978ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .changelog/_unreleased.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ changes:
component: general
description: add `extra_requires[test]` in generated `setup.py`
fixes: []
- type: fix
component: general
description: fix `setup.py` rendering for inherit license files
fixes: ['21']
5 changes: 2 additions & 3 deletions src/shut/renderers/setuptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ def run(self):
if license_file and license_file.startswith(os.pardir + os.sep):
# We need to copy the license from the monorepo.
self._render_temp_file_copy_function(fp)
license_src = os.path.relpath(license_file, package.get_directory())
license_dst = os.path.basename(license_src)
fp.write('\n_tempcopy({!r}, {!r})\n'.format(license_src, license_dst))
license_dst = os.path.basename(license_file)
fp.write('\n_tempcopy({!r}, {!r})\n'.format(license_file, license_dst))

readme_file, long_description_expr = self._render_readme_code(fp, package)

Expand Down

0 comments on commit d1978ca

Please sign in to comment.