Skip to content
Open
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
4 changes: 2 additions & 2 deletions conan_ue4cli/commands/generate.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from ..common import ConanTools, DelegateManager, PackageManagement, ProfileManagement, Utility
import argparse, copy, glob, os, platform, re, sys, tempfile
from os.path import abspath, dirname, exists, join
from pkg_resources import parse_version
from packaging import version

def _getClangVersion(clangPath):
'''
Retrieves the version number for the specified clang executable
'''
(stdout, stderr) = Utility.run([clangPath, '--version'])
matches = re.search('clang version (.+) \\(', stdout)
return parse_version(matches.group(1).replace('-', '.'))
return version.parse(matches.group(1).replace('-', '.'))

def _locateClang(manager, architecture='x86_64'):
'''
Expand Down
4 changes: 2 additions & 2 deletions conan_ue4cli/common/RecipeManagement.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from os.path import basename, dirname, join
from pkg_resources import parse_version
from packaging import version
from .Utility import Utility
import glob, re

Expand All @@ -24,7 +24,7 @@ def getLatestVersion(name, user, channel):

# Extract the list of version numbers and return the highest available version
references = [RecipeManagement.parseReference(recipe['recipe']['id']) for recipe in recipes[0]]
versions = sorted([parse_version(reference['version']) for reference in references])
versions = sorted([version.parse(reference['version']) for reference in references])
return str(versions[-1])

@staticmethod
Expand Down
9 changes: 7 additions & 2 deletions conan_ue4cli/data/packages/toolchain-wrapper/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ def _find_libcxx(self, root, architecture):
'''
Attempts to locate the libc++ static library for the specified architecture under the supplied root directory
'''

libraries = glob.glob(join(root, "lib", "Linux", "*{}*".format(architecture), "libc++.a"))
if len(libraries) > 0:
return libraries[0]
else:
raise RuntimeError('Failed to locate libc++.a for architecture "{}" inside directory "{}"!'.format(architecture, root))

libraries = glob.glob(join(root, "lib", "Unix", "*{}*".format(architecture), "libc++.a"))
if len(libraries) > 0:
return libraries[0]

raise RuntimeError('Failed to locate libc++.a for architecture "{}" inside directory "{}"!'.format(architecture, root))

def package(self):

Expand Down