cern-fts / gfal2-python Goto Github PK
View Code? Open in Web Editor NEWpython2 and 3 bindings for gfal2
Home Page: https://dmc-docs.web.cern.ch/dmc-docs/gfal2-python.html
License: Apache License 2.0
python2 and 3 bindings for gfal2
Home Page: https://dmc-docs.web.cern.ch/dmc-docs/gfal2-python.html
License: Apache License 2.0
I see that the latest 1.10.x releases have a few extremely important bug fixes and I wonder if there are any plans to package and upload that version to PyPi? Thanks
Dear Experts,
In one of our cleanup services we are using gfal2-python
for remote deletions at the sites. It is working well, but we have troubles accounting the errors. And more precisely: we are doing ctx.unlink([list of pfns])
and once we have the returned list of GErrors we iterate through it and try to preserve them in an external database. The database we use is MongoDB. And as simple it sounds it still leads us to a problem with inserting the records in the external database, because some of the error messages are having way too complicate format to be used as key values in the database. Which is kind of a blocker for us. Here we have some more details about the errors we are fighting with: [1]. There could be plenty of solutions to the problem and one way out of the situation is a well defined mapping between error codes and human readable strings/variables, enums etc... anything of the sort would do. Do you already have such mapping or a place (eventually in the documentation or in a header file), where we can take a look and create it ourselves?
Thanks in advance!
Dear all,
For your information, I have also encountered a few issues when installing on Debian/Ubuntu and here are my results so far.
I have written down some notes here:
https://github.com/cfenell/rucio-1/blob/install-doc/doc/gfal2.md
My notes on installing Rucio on Ubuntu are also here:
https://github.com/cfenell/rucio-1/blob/install-doc/doc/rucio-server.md
Debian stable with gfal2 library and plugins from Debian unstable packages (version 2.20.5-1): gfal2-python and gfal2-util from develop branch compile without problems and the gfal CLI utils seem to work flawlessly.
Ubuntu 20.04 with gfal2 version 2.20.3: gfal2-python and gfal2-util from develop branch fail to compile. Master branch compiles but I get
gfal-ls gsiftp://..../
gfal-ls error: 70 (Communication error on send) - globus_l_ftp_control_send_cmd_cb: gss_init_sec_context failed to generate output token
Is this expected or have I missed something else?
Best regards Carl-Fredrik Enell, EISCAT
After encountering problems with rucio installation, I traced the problem to gfal2-python, which was not installed. (I don't know whether it was supposed to be installed automatically with rucio).
So I tried to install it myself using pip3, and that failed during compilation.
Then I tried installing from the git repository and found there the same errors.
So,
I hacked two cmake files to fix this inelegantly. It seems like one problem is that these days, the python version must be appended to a find_package command, so line 19 of CMakeLists.txt
looks something like this in my inelegant hack:
-find_package(Boost COMPONENTS python REQUIRED)
+find_package(Boost COMPONENTS python38 REQUIRED)
Then in src/CMakeLists.txt, the following inelegant hack was required
include_directories(${Boost_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIRS} ${GTHREAD2_INCLUDE_DIRS}
I'm sure you don't want to take my "solution" but hopefully with this post you can see that there is a problem to be fixed.
Best, Joe Boudreau
I'm trying to install gfal2-python in a docker image.
My Dockerfile is the following:
FROM python:3.11
RUN apt update && apt install --no-install-recommends -y cmake \
gfal2 libgfal2-dev libgfal2-2 && rm -rf /var/lib/apt/lists/*
RUN pip install gfal2-python
I get the following error:
> [5/9] RUN pip install gfal2-python:
1.216 Collecting gfal2-python
1.258 Downloading gfal2-python-1.12.0.tar.gz (41 kB)
1.268 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.5/41.5 kB 4.5 MB/s eta 0:00:00
1.275 Preparing metadata (setup.py): started
1.543 Preparing metadata (setup.py): finished with status 'done'
1.544 Building wheels for collected packages: gfal2-python
1.545 Building wheel for gfal2-python (setup.py): started
2.472 Building wheel for gfal2-python (setup.py): finished with status 'error'
2.483 error: subprocess-exited-with-error
2.483
2.483 × python setup.py bdist_wheel did not run successfully.
2.483 │ exit code: 1
2.483 ╰─> [110 lines of output]
2.483 running bdist_wheel
2.483 running build
2.483 running build_ext
2.483 -- The C compiler identification is GNU 12.2.0
2.483 -- The CXX compiler identification is GNU 12.2.0
2.483 -- Detecting C compiler ABI info
2.483 -- Detecting C compiler ABI info - done
2.483 -- Check for working C compiler: /usr/bin/cc - skipped
2.483 -- Detecting C compile features
2.483 -- Detecting C compile features - done
2.483 -- Detecting CXX compiler ABI info
2.483 -- Detecting CXX compiler ABI info - done
2.483 -- Check for working CXX compiler: /usr/bin/c++ - skipped
2.483 -- Detecting CXX compile features
2.483 -- Detecting CXX compile features - done
2.483 CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required):
2.483 Compatibility with CMake < 2.8.12 will be removed from a future version of
2.483 CMake.
2.483
2.483 Update the VERSION argument <min> value or use a ...<max> suffix to tell
2.483 CMake that the project does not need compatibility with older versions.
2.483
2.483
2.483 cmake source dir : /tmp/pip-install-pk1oo01c/gfal2-python_f3199125f1644c0f8d58ea031fece52d
2.483 -- gfal2-bindings is used as APPLICATION_NAME
2.483 CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
2.483 The package name passed to `find_package_handle_standard_args` (Python3)
2.483 does not match the name of the calling package (PythonEasy). This can lead
2.483 to problems in calling code that expects `find_package` result variables
2.483 (e.g., `_FOUND`) to follow a certain pattern.
2.483 Call Stack (most recent call first):
2.483 cmake/modules/FindPythonEasy.cmake:93 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
2.483 CMakeLists.txt:23 (find_package)
2.483 This warning is for project developers. Use -Wno-dev to suppress it.
2.483
2.483 -- Found Python3: /usr/local/bin/python
2.483 CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
2.483 The package name passed to `find_package_handle_standard_args`
2.483 (PythonCurrentVersion) does not match the name of the calling package
2.483 (PythonEasy). This can lead to problems in calling code that expects
2.483 `find_package` result variables (e.g., `_FOUND`) to follow a certain
2.483 pattern.
2.483 Call Stack (most recent call first):
2.483 cmake/modules/FindPythonEasy.cmake:113 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
2.483 CMakeLists.txt:23 (find_package)
2.483 This warning is for project developers. Use -Wno-dev to suppress it.
2.483
2.483 -- Found PythonCurrentVersion: 3.11
2.483 CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
2.483 The package name passed to `find_package_handle_standard_args`
2.483 (PythonCurrentInclude) does not match the name of the calling package
2.483 (PythonEasy). This can lead to problems in calling code that expects
2.483 `find_package` result variables (e.g., `_FOUND`) to follow a certain
2.483 pattern.
2.483 Call Stack (most recent call first):
2.483 cmake/modules/FindPythonEasy.cmake:114 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
2.483 CMakeLists.txt:23 (find_package)
2.483 This warning is for project developers. Use -Wno-dev to suppress it.
2.483
2.483 -- Could NOT find PythonCurrentInclude (missing: PYTHON_INCLUDE_PATH)
2.483 CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
2.483 The package name passed to `find_package_handle_standard_args`
2.483 (PythonCurrentLibs) does not match the name of the calling package
2.483 (PythonEasy). This can lead to problems in calling code that expects
2.483 `find_package` result variables (e.g., `_FOUND`) to follow a certain
2.483 pattern.
2.483 Call Stack (most recent call first):
2.483 cmake/modules/FindPythonEasy.cmake:115 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
2.483 CMakeLists.txt:23 (find_package)
2.483 This warning is for project developers. Use -Wno-dev to suppress it.
2.483
2.483 -- Could NOT find PythonCurrentLibs (missing: PYTHON_LIBRARIES)
2.483 CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
2.483 The package name passed to `find_package_handle_standard_args`
2.483 (PythonCurrentModsDir) does not match the name of the calling package
2.483 (PythonEasy). This can lead to problems in calling code that expects
2.483 `find_package` result variables (e.g., `_FOUND`) to follow a certain
2.483 pattern.
2.483 Call Stack (most recent call first):
2.483 cmake/modules/FindPythonEasy.cmake:116 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
2.483 CMakeLists.txt:23 (find_package)
2.483 This warning is for project developers. Use -Wno-dev to suppress it.
2.483
2.483 -- Could NOT find PythonCurrentModsDir (missing: PYTHON_SITE_PACKAGES)
2.483 CMake Warning at CMakeLists.txt:46 (message):
2.483 Boost Python3 library not found
2.483
2.483
2.483 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
2.483 -- Checking for module 'glib-2.0'
2.483 -- Found glib-2.0, version 2.74.6
2.483 -- GLIB2 libraries: glib-2.0
2.483 -- GLIB2 include dir: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include
2.483 -- Found GLIB2: glib-2.0
2.483 -- Checking for module 'gthread-2.0'
2.483 -- Found gthread-2.0, version 2.74.6
2.483 -- GTHREAD2 libraries: gthread-2.0;glib-2.0
2.483 -- GTHREAD2 include dir: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include
2.483 -- Found GTHREAD2: gthread-2.0;glib-2.0
2.483 -- Checking for module 'gfal2'
2.483 -- Found gfal2, version 2.21.3
2.483 -- Checking for module 'gfal_transfer'
2.483 -- Found gfal_transfer, version 2.21.3
2.483 -- GFAL2 libraries: gfal2;glib-2.0;gfal_transfer;gfal2;glib-2.0
2.483 -- GFAL2 include dir: /usr/include/gfal2;/usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/include/gfal2;/usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include
2.483 -- Found GFAL2: gfal2;glib-2.0;gfal_transfer;gfal2;glib-2.0
2.483 -- Configuring done
2.483 -- Generating done
2.483 -- Build files have been written to: /tmp/pip-install-pk1oo01c/gfal2-python_f3199125f1644c0f8d58ea031fece52d/build/temp.linux-x86_64-cpython-311
2.483 error: [Errno 2] No such file or directory: 'build/temp.linux-x86_64-cpython-311/src/python3/gfal2.so'
2.483 [end of output]
2.483
2.483 note: This error originates from a subprocess, and is likely not a problem with pip.
2.484 ERROR: Failed building wheel for gfal2-python
2.484 Running setup.py clean for gfal2-python
2.618 Failed to build gfal2-python
2.619 ERROR: Could not build wheels for gfal2-python, which is required to install pyproject.toml-based projects
2.703
Any idea why the gfal2.so library is not found? (I tried with python3.9 but I get the same error)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.