file and python dependents: add missing dependencies (#26785)
* py-magic: delete redundant package
This package is actually named py-python-magic (since the project itself
is "python-magic").
* New package: libmagic
* Py-python-magic: add required runtime dependency on libmagic and new version
* Py-filemagic: add required runtime dependency
* py-magic: restore and mark as redundant
This reverts commit 4cab7fb69e
.
* file: add implicit dependencies and static variant
Replaces redundant libmagic that I added. Compression headers were previously
being picked up from the system.
* Fix py-python-magic dependency
* Update python version requirements
This commit is contained in:
parent
e0ff44a056
commit
bf42d3d49b
@ -15,6 +15,8 @@ class File(AutotoolsPackage):
|
|||||||
homepage = "https://www.darwinsys.com/file/"
|
homepage = "https://www.darwinsys.com/file/"
|
||||||
url = "https://astron.com/pub/file/file-5.37.tar.gz"
|
url = "https://astron.com/pub/file/file-5.37.tar.gz"
|
||||||
|
|
||||||
|
maintainers = ['sethrj']
|
||||||
|
|
||||||
version('5.40', sha256='167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57')
|
version('5.40', sha256='167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57')
|
||||||
version('5.39', sha256='f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1')
|
version('5.39', sha256='f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1')
|
||||||
version('5.38', sha256='593c2ffc2ab349c5aea0f55fedfe4d681737b6b62376a9b3ad1e77b2cc19fa34')
|
version('5.38', sha256='593c2ffc2ab349c5aea0f55fedfe4d681737b6b62376a9b3ad1e77b2cc19fa34')
|
||||||
@ -22,8 +24,25 @@ class File(AutotoolsPackage):
|
|||||||
|
|
||||||
executables = ['^file$']
|
executables = ['^file$']
|
||||||
|
|
||||||
|
variant('static', default=True, description='Also build static libraries')
|
||||||
|
|
||||||
|
depends_on('bzip2')
|
||||||
|
depends_on('xz')
|
||||||
|
depends_on('zlib')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def determine_version(cls, exe):
|
def determine_version(cls, exe):
|
||||||
output = Executable(exe)('--version', output=str, error=str)
|
output = Executable(exe)('--version', output=str, error=str)
|
||||||
match = re.search(r'file-(\S+)', output)
|
match = re.search(r'file-(\S+)', output)
|
||||||
return match.group(1) if match else None
|
return match.group(1) if match else None
|
||||||
|
|
||||||
|
def configure_args(self):
|
||||||
|
args = [
|
||||||
|
"--disable-dependency-tracking",
|
||||||
|
"--enable-fsect-man5",
|
||||||
|
"--enable-zlib",
|
||||||
|
"--enable-bzlib",
|
||||||
|
"--enable-xzlib",
|
||||||
|
]
|
||||||
|
args += self.enable_or_disable('static')
|
||||||
|
return args
|
||||||
|
@ -15,3 +15,4 @@ class PyFilemagic(PythonPackage):
|
|||||||
version('1.6', sha256='e684359ef40820fe406f0ebc5bf8a78f89717bdb7fed688af68082d991d6dbf3')
|
version('1.6', sha256='e684359ef40820fe406f0ebc5bf8a78f89717bdb7fed688af68082d991d6dbf3')
|
||||||
|
|
||||||
depends_on('py-setuptools', type='build')
|
depends_on('py-setuptools', type='build')
|
||||||
|
depends_on('file', type='run')
|
||||||
|
@ -7,12 +7,17 @@
|
|||||||
|
|
||||||
|
|
||||||
class PyMagic(PythonPackage):
|
class PyMagic(PythonPackage):
|
||||||
"""A python wrapper for libmagic."""
|
"""A python wrapper for libmagic.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
DO NOT USE: this is a duplicate of py-python-magic and will be deleted.
|
||||||
|
"""
|
||||||
|
|
||||||
homepage = "https://github.com/ahupp/python-magic"
|
homepage = "https://github.com/ahupp/python-magic"
|
||||||
url = "https://github.com/ahupp/python-magic/archive/0.4.15.tar.gz"
|
url = "https://github.com/ahupp/python-magic/archive/0.4.15.tar.gz"
|
||||||
|
|
||||||
version('0.4.15', sha256='6d730389249ab1e34ffb0a3c5beaa44e116687ffa081e0176dab6c59ff271593')
|
version('0.4.15', sha256='6d730389249ab1e34ffb0a3c5beaa44e116687ffa081e0176dab6c59ff271593', deprecated=True)
|
||||||
|
|
||||||
|
depends_on('python@2.7.0:2.7,3.5:', type=('build', 'run'))
|
||||||
depends_on('py-setuptools', type='build')
|
depends_on('py-setuptools', type='build')
|
||||||
depends_on('file', type='run')
|
depends_on('file', type='run')
|
||||||
|
@ -8,11 +8,17 @@
|
|||||||
|
|
||||||
|
|
||||||
class PyPythonMagic(PythonPackage):
|
class PyPythonMagic(PythonPackage):
|
||||||
"""A python wrapper for libmagic"""
|
"""A python wrapper for libmagic.
|
||||||
|
|
||||||
|
This project is named python-magic but imports as the module name "magic".
|
||||||
|
"""
|
||||||
|
|
||||||
homepage = "https://github.com/ahupp/python-magic"
|
homepage = "https://github.com/ahupp/python-magic"
|
||||||
pypi = "python-magic/python-magic-0.4.15.tar.gz"
|
pypi = "python-magic/python-magic-0.4.15.tar.gz"
|
||||||
|
|
||||||
|
version('0.4.24', sha256='de800df9fb50f8ec5974761054a708af6e4246b03b4bdaee993f948947b0ebcf')
|
||||||
version('0.4.15', sha256='f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5')
|
version('0.4.15', sha256='f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5')
|
||||||
|
|
||||||
|
depends_on('python@2.7.0:2.7,3.5:', type=('build', 'run'))
|
||||||
depends_on('py-setuptools', type='build')
|
depends_on('py-setuptools', type='build')
|
||||||
|
depends_on('file', type='run')
|
||||||
|
Loading…
Reference in New Issue
Block a user