Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed dir2pi to use original file name in file link. #85

Merged
merged 1 commit into from
Jul 15, 2019
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
5 changes: 2 additions & 3 deletions libpip2pi/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ def _dir2pi(option, argv):
try_symlink(option, pkg_dir_name, pkgdirpath("simple", normalize_pip67(pkg_name)))
try_symlink(option, pkg_dir_name, pkgdirpath("simple", pkg_name))

pkg_new_basename = "-".join([pkg_name, pkg_rest])
symlink_target = os.path.join(pkg_dir, pkg_new_basename)
symlink_target = os.path.join(pkg_dir, pkg_basename)
symlink_source = os.path.join("../../", pkg_basename)
if option.use_symlink:
try_symlink(option, symlink_source, symlink_target)
Expand All @@ -383,7 +382,7 @@ def _dir2pi(option, argv):
if option.build_html:
with open(os.path.join(pkg_dir, "index.html"), "a") as fp:
fp.write("<a href='%(name)s'>%(name)s</a><br />\n" %{
"name": cgi.escape(pkg_new_basename),
"name": cgi.escape(pkg_basename),
})
pkg_index += "</body></html>\n"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ simple/fish/index.html
simple/index.html
simple/normalization-test-with-dashes
simple/normalization-test-with-dashes/index.html
simple/normalization-test-with-dashes/Normalization-Test.with-dashes-1.2rc3.zip -> ../../Normalization_Test.with-dashes-1.2rc3.zip
simple/normalization-test-with-dashes/Normalization_Test.with-dashes-1.2rc3.zip -> ../../Normalization_Test.with-dashes-1.2rc3.zip
simple/normalization-test.with-dashes -> normalization-test-with-dashes
2 changes: 1 addition & 1 deletion tests/test_requirements_txt/expected-normal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ simple/fish/index.html
simple/index.html
simple/normalization-test-with-dashes
simple/normalization-test-with-dashes/index.html
simple/normalization-test-with-dashes/Normalization-Test.with-dashes-1.2rc3.zip -> ../../Normalization_Test.with-dashes-1.2rc3.zip
simple/normalization-test-with-dashes/Normalization_Test.with-dashes-1.2rc3.zip -> ../../Normalization_Test.with-dashes-1.2rc3.zip