Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
75e6e794
Commit
75e6e794
authored
10 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug with extension() for sourceforge URLs.
parent
ee50a4cc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/util/compression.py
+6
-0
6 additions, 0 deletions
lib/spack/spack/util/compression.py
with
6 additions
and
0 deletions
lib/spack/spack/util/compression.py
+
6
−
0
View file @
75e6e794
...
...
@@ -23,6 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import
re
import
os
from
itertools
import
product
from
spack.util.executable
import
which
...
...
@@ -60,6 +61,11 @@ def strip_extension(path):
def
extension
(
path
):
"""
Get the archive extension for a path.
"""
# Strip sourceforge suffix.
if
re
.
search
(
r
'
((?:sourceforge.net|sf.net)/.*)/download$
'
,
path
):
path
=
os
.
path
.
dirname
(
path
)
for
type
in
ALLOWED_ARCHIVE_TYPES
:
suffix
=
r
'
\.%s$
'
%
type
if
re
.
search
(
suffix
,
path
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment