Fix build errors on Ubuntu 24.04 41/314541/2
authorxuhy <huayong.xu@samsung.com>
Thu, 6 Jun 2024 09:11:58 +0000 (17:11 +0800)
committerxuhy <huayong.xu@samsung.com>
Thu, 18 Jul 2024 07:21:24 +0000 (15:21 +0800)
python3 setup.py install --prefix=/usr does not work.
packages are always installed into /usr/local in default.

Change-Id: I3e30b704b5a30e49a029b7ed4c1bad8c327f8dd9
Signed-off-by: xuhy <huayong.xu@samsung.com>
debian/mic.install
debian/rules
mic/3rdparty/requests/api.py
mic/3rdparty/requests/models.py
mic/3rdparty/requests/packages/urllib3/connectionpool.py
mic/3rdparty/requests/packages/urllib3/poolmanager.py
mic/3rdparty/requests/sessions.py

index adadd7f34b98a01d6abe237733901ea73e2d083b..b163432e1fe2eb79dde41354b513d285c7613a05 100644 (file)
@@ -1,4 +1,4 @@
-debian/tmp/usr/bin/mic  /usr/bin
-debian/tmp/usr/lib/*  /usr/lib
-debian/tmp/usr/share/*  /usr/share
-debian/tmp/etc/*  /etc
+usr/local/bin/mic /usr/bin
+usr/local/lib/*
+usr/share/*
+etc/*
index dd312e2dec386fe6d6c0629a8b712c80c07d3161..33f3b5fb96e353c9dda3f259834d0f3dd13c68bb 100755 (executable)
@@ -1,8 +1,10 @@
 #!/usr/bin/make -f
 %:
        dh $@ --with python3 --buildsystem=pybuild
+
 build:
        make man
+
 override_dh_auto_install:
        dh_auto_install
        # Installing package
@@ -14,9 +16,10 @@ override_dh_auto_install:
        install -m644 doc/mic.1 $(CURDIR)/debian/tmp/usr/share/man/man1
        install -m755 etc/bash_completion.d/mic.sh $(CURDIR)/debian/tmp/etc/bash_completion.d/
        install -m755 etc/zsh_completion.d/_mic $(CURDIR)/debian/tmp/etc/zsh_completion.d/_mic
-       python3 setup.py install --root=$(CURDIR)/debian/tmp --prefix=/usr
+       python3 setup.py install --root=$(CURDIR)/debian/tmp --prefix=/usr/local
 
 override_dh_installchangelogs:
        dh_installchangelogs ChangeLog
+
 override_dh_auto_test:
 
index d40fa380461c73308829165e539118ae3b9eda4f..9c7dd2a8b5787aadbaca434611563cb9cf6b6ab3 100755 (executable)
@@ -56,7 +56,7 @@ def request(method, url, **kwargs):
 
 
 def get(url, params=None, **kwargs):
-    """Sends a GET request.
+    r"""Sends a GET request.
 
     :param url: URL for the new :class:`Request` object.
     :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
@@ -70,7 +70,7 @@ def get(url, params=None, **kwargs):
 
 
 def options(url, **kwargs):
-    """Sends a OPTIONS request.
+    r"""Sends a OPTIONS request.
 
     :param url: URL for the new :class:`Request` object.
     :param \*\*kwargs: Optional arguments that ``request`` takes.
@@ -83,7 +83,7 @@ def options(url, **kwargs):
 
 
 def head(url, **kwargs):
-    """Sends a HEAD request.
+    r"""Sends a HEAD request.
 
     :param url: URL for the new :class:`Request` object.
     :param \*\*kwargs: Optional arguments that ``request`` takes.
@@ -96,7 +96,7 @@ def head(url, **kwargs):
 
 
 def post(url, data=None, json=None, **kwargs):
-    """Sends a POST request.
+    r"""Sends a POST request.
 
     :param url: URL for the new :class:`Request` object.
     :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
@@ -110,7 +110,7 @@ def post(url, data=None, json=None, **kwargs):
 
 
 def put(url, data=None, **kwargs):
-    """Sends a PUT request.
+    r"""Sends a PUT request.
 
     :param url: URL for the new :class:`Request` object.
     :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
@@ -123,7 +123,7 @@ def put(url, data=None, **kwargs):
 
 
 def patch(url, data=None, **kwargs):
-    """Sends a PATCH request.
+    r"""Sends a PATCH request.
 
     :param url: URL for the new :class:`Request` object.
     :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
@@ -136,7 +136,7 @@ def patch(url, data=None, **kwargs):
 
 
 def delete(url, **kwargs):
-    """Sends a DELETE request.
+    r"""Sends a DELETE request.
 
     :param url: URL for the new :class:`Request` object.
     :param \*\*kwargs: Optional arguments that ``request`` takes.
index 42369c59d5a848e9e42abe57f62359958e9b967d..85f206cac27180ae424be56871cb4a738de20939 100755 (executable)
@@ -792,7 +792,7 @@ class Response(object):
         return content
 
     def json(self, **kwargs):
-        """Returns the json-encoded content of a response, if any.
+        r"""Returns the json-encoded content of a response, if any.
 
         :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
         """
index c5f8b8ed755f3eb4ba48bae59ec4d1b6a294fb16..7e1fb5796eaff5a1b883804f4354db71a04aed59 100755 (executable)
@@ -92,7 +92,7 @@ _blocking_errnos = set([errno.EAGAIN, errno.EWOULDBLOCK])
 
 
 class HTTPConnectionPool(ConnectionPool, RequestMethods):
-    """
+    r"""
     Thread-safe connection pool for one host.
 
     :param host:
@@ -421,7 +421,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
     def urlopen(self, method, url, body=None, headers=None, retries=None,
                 redirect=True, assert_same_host=True, timeout=_Default,
                 pool_timeout=None, release_conn=None, **response_kw):
-        """
+        r"""
         Get a connection from the pool and perform an HTTP request. This is the
         lowest level call for making a request, so you'll need to specify all
         the raw details.
@@ -769,7 +769,7 @@ class HTTPSConnectionPool(HTTPConnectionPool):
 
 
 def connection_from_url(url, **kw):
-    """
+    r"""
     Given a url, return an :class:`.ConnectionPool` instance of its host.
 
     This is a shortcut for not having to parse out the scheme, host, and port
index a50ac23e7240db17c24b496aed154e4baaa0a017..e103d76727fb9621e7221e2c47e1c71549fee427 100755 (executable)
@@ -29,7 +29,7 @@ SSL_KEYWORDS = ('key_file', 'cert_file', 'cert_reqs', 'ca_certs',
 
 
 class PoolManager(RequestMethods):
-    """
+    r"""
     Allows for arbitrary requests while transparently keeping track of
     necessary connection pools for you.
 
index 4195a7d80b1898402ae5052301268f3a90a16bc0..0d0e71ced854562ee180ff2a7923792a7af53fa3 100755 (executable)
@@ -467,7 +467,7 @@ class Session(SessionRedirectMixin):
         return resp
 
     def get(self, url, **kwargs):
-        """Sends a GET request. Returns :class:`Response` object.
+        r"""Sends a GET request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param \*\*kwargs: Optional arguments that ``request`` takes.
@@ -477,7 +477,7 @@ class Session(SessionRedirectMixin):
         return self.request('GET', url, **kwargs)
 
     def options(self, url, **kwargs):
-        """Sends a OPTIONS request. Returns :class:`Response` object.
+        r"""Sends a OPTIONS request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param \*\*kwargs: Optional arguments that ``request`` takes.
@@ -487,7 +487,7 @@ class Session(SessionRedirectMixin):
         return self.request('OPTIONS', url, **kwargs)
 
     def head(self, url, **kwargs):
-        """Sends a HEAD request. Returns :class:`Response` object.
+        r"""Sends a HEAD request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param \*\*kwargs: Optional arguments that ``request`` takes.
@@ -497,7 +497,7 @@ class Session(SessionRedirectMixin):
         return self.request('HEAD', url, **kwargs)
 
     def post(self, url, data=None, json=None, **kwargs):
-        """Sends a POST request. Returns :class:`Response` object.
+        r"""Sends a POST request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
@@ -508,7 +508,7 @@ class Session(SessionRedirectMixin):
         return self.request('POST', url, data=data, json=json, **kwargs)
 
     def put(self, url, data=None, **kwargs):
-        """Sends a PUT request. Returns :class:`Response` object.
+        r"""Sends a PUT request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
@@ -518,7 +518,7 @@ class Session(SessionRedirectMixin):
         return self.request('PUT', url, data=data, **kwargs)
 
     def patch(self, url, data=None, **kwargs):
-        """Sends a PATCH request. Returns :class:`Response` object.
+        r"""Sends a PATCH request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
@@ -528,7 +528,7 @@ class Session(SessionRedirectMixin):
         return self.request('PATCH', url,  data=data, **kwargs)
 
     def delete(self, url, **kwargs):
-        """Sends a DELETE request. Returns :class:`Response` object.
+        r"""Sends a DELETE request. Returns :class:`Response` object.
 
         :param url: URL for the new :class:`Request` object.
         :param \*\*kwargs: Optional arguments that ``request`` takes.