diff --git a/setup.cfg b/setup.cfg
index 336316bac61e9f018bdd374573e1a374be0caaa0..a604efc4e465403681a3c08e9834d13327c7b97b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,50 +1,6 @@
 [install]
 optimize=1
 
-[bdist_rpm]
-no-autoreq = yes
-install-script = setup/redhat/install.sh
-post-install = setup/redhat/postinstall.sh
-
-requires =
-  sassc
-  python(abi) >= 3.8
-  python3-babel
-  python3-decorator
-  python3-docutils
-  python3-freezegun
-  python3-gevent
-  python3-greenlet
-  python3-idna
-  python3-jinja2
-  python3-lxml
-  python3-markupsafe
-  python3-mock
-  python3-num2words
-  python3-ofxparse
-  python3-passlib
-  python3-pillow
-  python3-psutil
-  python3-psycopg2
-  python3-polib
-  python3-pydot
-  python3-PyPDF2
-  python3-pyOpenSSL
-  python3-pyserial
-  python3-dateutil
-  python3-pytz
-  python3-pyusb
-  python3-qrcode
-  python3-reportlab
-  python3-requests
-  python3-six
-  python3-stdnum
-  python3-vobject
-  python3-werkzeug
-  python3-xlwt
-  python3-xlrd
-  python3-zeep
-
 [flake8]
 extend-exclude =
   .git,
diff --git a/setup.py b/setup.py
index ced4ee02e0de0788be3430c95a1aff69bd94f06f..c9abe74cd4ed83b2491db75938b1e167f43d1350 100644
--- a/setup.py
+++ b/setup.py
@@ -24,14 +24,18 @@ setup(
     include_package_data=True,
     install_requires=[
         'babel >= 1.0',
+        'chardet',
+        'cryptography',
         'decorator',
         'docutils',
         'gevent',
+        'greenlet',
         'idna',
         'Jinja2',
         'lxml',  # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
         'libsass',
-        'mock',
+        'MarkupSafe',
+        'num2words',
         'ofxparse',
         'passlib',
         'pillow',  # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
@@ -40,7 +44,7 @@ setup(
         'psycopg2 >= 2.2',
         'pydot',
         'pyopenssl',
-        'pypdf2',
+        'PyPDF2',
         'pyserial',
         'python-dateutil',
         'python-stdnum',
@@ -49,16 +53,17 @@ setup(
         'qrcode',
         'reportlab',  # windows binary pypi.python.org/pypi/reportlab
         'requests',
-        'zeep',
+        'urllib3',
         'vobject',
         'werkzeug',
+        'xlrd',
         'xlsxwriter',
         'xlwt',
+        'zeep',
     ],
     python_requires='>=3.7',
     extras_require={
         'ldap': ['python-ldap'],
-        'SSL': ['pyopenssl'],
     },
     tests_require=[
         'freezegun',
diff --git a/setup/package.dffedora b/setup/package.dffedora
index e9f334d65a7129844ecbec6b600ebb2fd85c7d21..c2a0149386c039b56d5371ddb9c87b23ab1f2bb0 100644
--- a/setup/package.dffedora
+++ b/setup/package.dffedora
@@ -1,6 +1,6 @@
 # Please note that this Dockerfile is used for testing nightly builds and should
 # not be used to deploy Odoo
-FROM fedora:34
+FROM fedora:36
 MAINTAINER Odoo S.A. <info@odoo.com>
 
 # Dependencies and postgres
@@ -14,7 +14,9 @@ RUN dnf update -d 0 -e 0 -y && \
         postgresql-libs \
         postgresql-server \
         python3-PyPDF2 \
+        python3-cryptography \
         python3-babel \
+        python3-chardet \
         python3-dateutil \
         python3-decorator \
         python3-devel \
@@ -24,6 +26,7 @@ RUN dnf update -d 0 -e 0 -y && \
         python3-greenlet \
         python3-idna \
         python3-jinja2 \
+        python3-libsass \
         python3-lxml \
         python3-markupsafe \
         python3-mock \
@@ -47,6 +50,7 @@ RUN dnf update -d 0 -e 0 -y && \
         python3-stdnum \
         python3-vobject \
         python3-werkzeug \
+        python3-wheel \
         python3-xlrd \
         python3-xlsxwriter \
         python3-xlwt \
diff --git a/setup/rpm/odoo.spec b/setup/rpm/odoo.spec
index ea31715233884f929f078f204b25229fd0429646..6584561cc0ba97405c1076dc4fd07c2e22a22547 100644
--- a/setup/rpm/odoo.spec
+++ b/setup/rpm/odoo.spec
@@ -15,6 +15,7 @@ BuildArch: noarch
 Vendor: Odoo S.A. <info@odoo.com>
 Requires: sassc
 BuildRequires: python3-devel
+BuildRequires: pyproject-rpm-macros
 Url: https://www.odoo.com
 
 %description
@@ -24,6 +25,9 @@ automation, marketing campaigns, help desk, POS, etc. Technical features include
 a distributed server, an object database, a dynamic GUI,
 customizable reports, and XML-RPC interfaces.
 
+%generate_buildrequires
+%pyproject_buildrequires
+
 %prep
 %autosetup