#1 Merge branch 'master' into epel8
Merged 3 years ago by jussilehtola. Opened 3 years ago by junghans.
rpms/ junghans/libxc epel8  into  epel8

file modified
+23
@@ -0,0 +1,23 @@ 

+ /libxc-1.0.tar.gz

+ /libxc-1.1.0.tar.gz

+ /libxc-1.2.0.tar.gz

+ /libxc-2.0.0.tar.gz

+ /libxc-2.0.1.tar.gz

+ /libxc-2.0.2.tar.gz

+ /libxc-2.0.3.tar.gz

+ /libxc-2.1.0.tar.gz

+ /libxc-2.1.2.tar.gz

+ /libxc-3.0.0.tar.gz

+ /libxc-4.0.0.tar.gz

+ /libxc-4.0.1.tar.gz

+ /libxc-4.0.2.tar.gz

+ /libxc-4.0.4.tar.gz

+ /libxc-4.0.5.tar.gz

+ /libxc-4.1.0.tar.gz

+ /libxc-4.1.1.tar.gz

+ /libxc-4.2.0.tar.gz

+ /libxc-4.2.3.tar.gz

+ /libxc-4.3.0.tar.gz

+ /libxc-4.3.1.tar.gz

+ /libxc-4.3.2.tar.gz

+ /libxc-4.3.3.tar.gz

@@ -0,0 +1,99 @@ 

+ diff -up libxc-4.3.3/pylibxc/core.py.pylibxc libxc-4.3.3/pylibxc/core.py

+ --- libxc-4.3.3/pylibxc/core.py.pylibxc	2018-05-07 13:39:15.000000000 +0200

+ +++ libxc-4.3.3/pylibxc/core.py	2019-02-11 13:01:27.788266185 +0100

+ @@ -8,25 +8,7 @@ import numpy as np

+  import os

+  

+  # Attempt to load the compiled C code

+ -core = None

+ -

+ -# First check the local folder

+ -try:

+ -    dirpath = os.path.abspath(os.path.dirname(__file__))

+ -    core = np.ctypeslib.load_library("libxc", dirpath)

+ -except OSError:

+ -    # If no libxc is local, check LD_LIBRARY_PATHS's

+ -    libxc_path = ctypes.util.find_library("libxc")

+ -

+ -    # If we still havent found it, give up and throw an error

+ -    if libxc_path is None:

+ -        raise ImportError(

+ -            "LibXC Shared object not found, searched Python module local directory and library paths"

+ -        )

+ -    

+ -    # Load the C object

+ -    core = ctypes.CDLL(__libxc_path)

+ -

+ +core = ctypes.CDLL("libxc.so.@SOVERSION@")

+  

+  def get_core_path():

+      """

+ diff -up libxc-4.3.3/setup.py.pylibxc libxc-4.3.3/setup.py

+ --- libxc-4.3.3/setup.py.pylibxc	2019-02-11 11:20:40.000000000 +0100

+ +++ libxc-4.3.3/setup.py	2019-02-11 13:01:27.791266054 +0100

+ @@ -8,56 +8,6 @@ from setuptools import setup, find_packa

+  from setuptools.command.build_ext import build_ext

+  from distutils.version import LooseVersion

+  

+ -

+ -class CMakeExtension(Extension):

+ -    def __init__(self, name, sourcedir=''):

+ -        Extension.__init__(self, name, sources=[])

+ -        self.sourcedir = os.path.abspath(sourcedir)

+ -

+ -

+ -class CMakeBuild(build_ext):

+ -    def run(self):

+ -        try:

+ -            out = subprocess.check_output(['cmake', '--version'])

+ -        except OSError:

+ -            raise RuntimeError("CMake must be installed to build the following extensions: " +

+ -                               ", ".join(e.name for e in self.extensions))

+ -

+ -        if platform.system() == "Windows":

+ -            cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))

+ -            if cmake_version < '3.1.0':

+ -                raise RuntimeError("CMake >= 3.1.0 is required on Windows")

+ -

+ -        for ext in self.extensions:

+ -            self.build_extension(ext)

+ -

+ -    def build_extension(self, ext):

+ -        extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))

+ -        cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir]

+ -        cmake_args += ['-DBUILD_SHARED_LIBS=ON']

+ -        cmake_args += ['-DBUILD_TESTING=OFF']

+ -

+ -        cfg = 'Debug' if self.debug else 'Release'

+ -        build_args = ['--config', cfg]

+ -

+ -        if platform.system() == "Windows":

+ -            cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)]

+ -            if sys.maxsize > 2**32:

+ -                cmake_args += ['-A', 'x64']

+ -            build_args += ['--', '/m']

+ -        else:

+ -            cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]

+ -            build_args += ['--', '-j2']

+ -

+ -        env = os.environ.copy()

+ -        env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(

+ -            env.get('CXXFLAGS', ''), self.distribution.get_version())

+ -        if not os.path.exists(self.build_temp):

+ -            os.makedirs(self.build_temp)

+ -        subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)

+ -        subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)

+ -

+ -

+  if __name__ == "__main__":

+      exec(open(os.path.join(os.path.abspath(os.path.dirname(__file__)), "pylibxc/version.py")).read())

+      setup(

+ @@ -89,8 +39,6 @@ if __name__ == "__main__":

+              'pytest-cov',

+          ],

+          packages=find_packages(),

+ -        ext_modules=[CMakeExtension('pylibxc.libxc')],

+ -        cmdclass=dict(build_ext=CMakeBuild),

+          classifiers=[

+              'Development Status :: 4 - Beta',

+              'Intended Audience :: Science/Research',

file added
+338
@@ -0,0 +1,338 @@ 

+ %if 0%{?fedora}

+ %bcond_without python3

+ %else

+ %bcond_with python3

+ %endif

+ 

+ %if 0%{?fedora} >= 30

+ %bcond_with python2

+ %else

+ %bcond_without python2

+ %endif

+ 

+ %global soversion 5

+ 

+ Name:           libxc

+ Summary:        Library of exchange and correlation functionals for density-functional theory

+ Version:        4.3.3

+ Release:        3%{?dist}

+ License:        MPLv2.0

+ Source0:        http://www.tddft.org/programs/octopus/down.php?file=libxc/%{version}/libxc-%{version}.tar.gz

+ # Don't rebuild libxc for pylibxc

+ Patch0:         libxc-4.3.3-pylibxc.patch

+ 

+ URL:            http://www.tddft.org/programs/octopus/wiki/index.php/Libxc

+ 

+ BuildRequires:  gcc-gfortran

+ BuildRequires:  libtool

+ 

+ %if %{with python2}

+ BuildRequires:  python2-devel

+ BuildRequires:  python2-numpy

+ %endif

+ %if %{with python3}

+ BuildRequires:  python3-devel

+ BuildRequires:  python3-numpy

+ %endif

+ 

+ %if ! %{with python2}

+ Obsoletes:      python2-%{name} < %{version}-%{release}

+ %endif

+ %if ! %{with python3}

+ Obsoletes:      python3-%{name} < %{version}-%{release}

+ %endif

+ 

+ %description

+ libxc is a library of exchange and correlation functionals. Its purpose is to

+ be used in codes that implement density-functional theory. For the moment, the

+ library includes most of the local density approximations (LDAs), generalized

+ density approximation (GGAs), and meta-GGAs. The library provides values for

+ the energy density and its 1st, 2nd, and (for the LDAs) 3rd derivatives.

+ 

+ %package devel

+ Summary:        Development library and headers for libxc

+ Requires:       %{name}%{?_isa} = %{version}-%{release}

+ Requires:       pkgconfig

+ 

+ %description devel

+ libxc is a library of exchange and correlation functionals. Its purpose is to

+ be used in codes that implement density-functional theory. For the moment, the

+ library includes most of the local density approximations (LDAs), generalized

+ density approximation (GGAs), and meta-GGAs. The library provides values for

+ the energy density and its 1st, 2nd, and (for the LDAs) 3rd derivatives.

+ 

+ This package contains the development headers and library that are necessary

+ in order to compile programs against libxc.

+ 

+ %if %{with python2}

+ %package -n python2-%{name}

+ Summary:        Python2 interface to libxc

+ Requires:       python2-numpy

+ Requires:       %{name} = %{version}-%{release}

+ BuildArch:      noarch

+ %{?python_provide:%python_provide python2-%{name}}

+ 

+ %description -n python2-%{name}

+ libxc is a library of exchange and correlation functionals. Its purpose is to

+ be used in codes that implement density-functional theory. For the moment, the

+ library includes most of the local density approximations (LDAs), generalized

+ density approximation (GGAs), and meta-GGAs. The library provides values for

+ the energy density and its 1st, 2nd, and (for the LDAs) 3rd derivatives.

+ 

+ This package contains the Python2 interface library to libxc.

+ %endif

+ 

+ %if %{with python3}

+ %package -n python3-%{name}

+ Summary:        Python3 interface to libxc

+ Requires:       python3-numpy

+ Requires:       %{name} = %{version}-%{release}

+ BuildArch:      noarch

+ %if 0%{?rhel}

+ %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}

+ %else

+ %{?python_provide:%python_provide python3-%{name}}

+ %endif

+ %description -n python3-%{name}

+ libxc is a library of exchange and correlation functionals. Its purpose is to

+ be used in codes that implement density-functional theory. For the moment, the

+ library includes most of the local density approximations (LDAs), generalized

+ density approximation (GGAs), and meta-GGAs. The library provides values for

+ the energy density and its 1st, 2nd, and (for the LDAs) 3rd derivatives.

+ 

+ This package contains the Python3 interface library to libxc.

+ %endif

+ 

+ %prep

+ %setup -q

+ %patch0 -p1 -b .pylibxc

+ # Plug in library soversion

+ sed -i "s|@SOVERSION@|%{soversion}|g" pylibxc/core.py

+ 

+ %build

+ # Don't insert C code during preprocessing

+ export FCCPP="cpp -ffreestanding"

+ %configure --enable-shared --disable-static

+ # Remove rpath

+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool

+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

+ # SMP make doesn't work

+ #make %{?_smp_mflags}

+ make

+ 

+ # Check we have the right soversion

+ if [[ ! -f src/.libs/libxc.so.%{soversion} ]]; then

+     echo "soversion has changed!"

+     exit

+ fi

+ 

+ # Build python interface

+ %if %{with python2}

+ %{py2_build}

+ %endif

+ %if %{with python3}

+ %{py3_build}

+ %endif

+ 

+ %install

+ %make_install

+ # Move modules in the right place

+ mkdir -p %{buildroot}%{_fmoddir}

+ mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir}

+ # Get rid of .la files

+ find %{buildroot}%{_libdir} -name *.la -exec rm -rf {} \;

+ 

+ # Install python interface

+ %if %{with python2}

+ %{py2_install}

+ %endif

+ %if %{with python3}

+ %{py3_install}

+ %endif

+ 

+ %if 0%{?rhel} == 6 || 0%{?rhel} == 7

+ %post -p /sbin/ldconfig

+ %postun -p /sbin/ldconfig

+ %else

+ %ldconfig_scriptlets

+ %endif

+ 

+ %files

+ %doc README NEWS COPYING AUTHORS ChangeLog TODO

+ %{_bindir}/xc-info

+ %{_bindir}/xc-threshold

+ %{_libdir}/libxc.so.%{soversion}*

+ %{_libdir}/libxcf03.so.%{soversion}*

+ %{_libdir}/libxcf90.so.%{soversion}*

+ 

+ %files devel

+ %{_libdir}/libxc.so

+ %{_libdir}/libxcf03.so

+ %{_libdir}/libxcf90.so

+ %{_includedir}/xc*.h

+ %{_fmoddir}/libxc_funcs_m.mod

+ %{_fmoddir}/xc_f03_*.mod

+ %{_fmoddir}/xc_f90_*.mod

+ %{_libdir}/pkgconfig/libxc.pc

+ %{_libdir}/pkgconfig/libxcf03.pc

+ %{_libdir}/pkgconfig/libxcf90.pc

+ 

+ %if %{with python2}

+ %files -n python2-%{name}

+ %{python2_sitelib}/pylibxc/

+ %{python2_sitelib}/pylibxc-%{version}-py*.egg-info

+ %endif

+ 

+ %if %{with python3}

+ %files -n python3-%{name}

+ %{python3_sitelib}/pylibxc/

+ %{python3_sitelib}/pylibxc-%{version}-py*.egg-info

+ %endif

+ 

+ %changelog

+ * Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.3.3-3

+ - Rebuilt for Python 3.8

+ 

+ * Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.3-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

+ 

+ * Mon Feb 11 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.3.3-1

+ - Update to 4.3.3.

+ 

+ * Fri Feb 08 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.3.2-1

+ - Update to 4.3.2.

+ 

+ * Wed Feb 06 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.3.1-1

+ - Update to 4.3.1.

+ 

+ * Wed Jan 30 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.3.0-1

+ - Update to 4.3.0.

+ 

+ * Wed Nov 21 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.2.3-1

+ - Remove python2 subpackage from rawhide.

+ - Update to 4.2.3.

+ 

+ * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

+ 

+ * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.2.0-2

+ - Rebuilt for Python 3.7

+ 

+ * Tue Jun 05 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.2.0-1

+ - Update to 4.2.0.

+ 

+ * Wed May 09 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.1.1-1

+ - Update to 4.1.1, changing license to MPLv2 and adding Python interface.

+ 

+ * Fri May 04 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0.5-1

+ - Update to 4.0.5.

+ 

+ * Wed Feb 07 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0.4-1

+ - Update to 4.0.4.

+ 

+ * Mon Nov 20 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0.2-1

+ - Update to 4.0.2.

+ 

+ * Mon Oct 09 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0.1-1

+ - Update to 4.0.1.

+ 

+ * Wed Sep 27 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0.0-1

+ - Update to 4.0.0, removing single precision libraries.

+ 

+ * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

+ 

+ * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

+ 

+ * Sun Feb 05 2017 Kalev Lember <klember@redhat.com> - 3.0.0-3

+ - Rebuilt for libgfortran soname bump

+ 

+ * Thu Jun 30 2016 Rafael Fonseca <rdossant@redhat.com> - 3.0.0-2

+ - Fix compilation on ppc64.

+ 

+ * Thu Apr 21 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 3.0.0-1

+ - Update to 3.0.0.

+ 

+ * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-6

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

+ 

+ * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.2-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

+ 

+ * Sat May 02 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.2-4

+ - Drop gfortran requires on -devel.

+ 

+ * Fri Apr 24 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.2-3

+ - Patch some hybrids.

+ 

+ * Fri Apr 24 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.2-2

+ - Patch broken makefiles.

+ 

+ * Thu Feb 19 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.2-1

+ - Update to 2.1.2.

+ 

+ * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

+ 

+ * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

+ 

+ * Mon Mar 24 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.0-2

+ - Re-enable builds on ppc and ppc64 on EPEL.

+ 

+ * Fri Mar 21 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1.0-1

+ - Enable single precision routines as well.

+ - Update to 2.1.0.

+ 

+ * Tue Feb 18 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0.3-1

+ - Update to 2.0.3.

+ 

+ * Mon Feb 17 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0.2-3

+ - Fix bug with some mgga correlation functionals.

+ 

+ * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

+ 

+ * Wed Jul 10 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0.2-1

+ - Update to 2.0.2.

+ 

+ * Wed Mar 06 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0.1-3

+ - Fix FTBFS in rawhide.

+ 

+ * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

+ 

+ * Mon Jan 21 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0.1-1

+ - Update to 2.0.1.

+ 

+ * Fri Dec 7 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0.0-1

+ - Update to 2.0.0.

+ 

+ * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

+ 

+ * Fri Jun 15 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.2.0-1

+ - Update to 1.2.0.

+ 

+ * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

+ 

+ * Fri May 13 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1.0-1

+ - Update to 1.1.0.

+ 

+ * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

+ 

+ * Sun Jan 23 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-4

+ - Clean buildroot at the beginning of %%install.

+ 

+ * Sun Jan 23 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-3

+ - Update tarball.

+ - Make requirement on gcc-gfortran in -devel architecture explicit.

+ 

+ * Sat Jan 22 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-2

+ - Minor review fixes.

+ 

+ * Tue Jan 18 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-1

+ - Initial specfile.

file modified
+1
@@ -0,0 +1,1 @@ 

+ SHA512 (libxc-4.3.3.tar.gz) = 46fd15b218bddf12e4261798dbadf0ed0ed42be095631fcee9cd358a4957072c1db59a256523992e6a7753b7a022469708bf1c3ba854fb32417ac522595546f7

I'm not the main maintainer of libxc and I don't really have time for this, sorry. @jussilehtola would be the best person to review and merge this.

Okay so CentOS 8 has been released on Sep 24.

I'd wait for libxc 5 before including libxc in EPEL 8 though. We're trying to wrap up a new stable release in the near term future.

That is fine, I am not in hurry, but as this is a zero modification merge request, you could as well bring it over.

Pull-Request has been merged by jussilehtola

3 years ago

No libxc5 for the foreseeable future, so I guess EPEL8 will have to do with libxc4.