From 6713699ebe4d8a401e741a0c39c80748cbb37147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez=20Moreno?= Date: Sat, 12 Nov 2022 10:13:46 +0100 Subject: [PATCH] [fix] Cambiamos requirements y setup para que sea compatible con python 3.11 --- requirements.txt | 2 +- setup.py | 84 ++++++++++++++++++++++++------------------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1d26042..ab00b00 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ chardet>=1.0.1 -cchardet>=0.3.5 +# cchardet>=0.3.5 cssselect html5lib joblib diff --git a/setup.py b/setup.py index cf8e7e6..205c1aa 100755 --- a/setup.py +++ b/setup.py @@ -5,10 +5,10 @@ from setuptools.command.install import install class InstallCommand(install): user_options = install.user_options + [ - ('no-ml', None, "Don't install without Machine Learning modules."), + ("no-ml", None, "Don't install without Machine Learning modules."), ] - boolean_options = install.boolean_options + ['no-ml'] + boolean_options = install.boolean_options + ["no-ml"] def initialize_options(self): install.initialize_options(self) @@ -18,47 +18,47 @@ class InstallCommand(install): install.finalize_options(self) if self.no_ml: dist = self.distribution - dist.packages=find_packages(exclude=[ - "tests", - "tests.*", - "talon.signature", - "talon.signature.*", - ]) + dist.packages = find_packages( + exclude=[ + "tests", + "tests.*", + "talon.signature", + "talon.signature.*", + ] + ) for not_required in ["numpy", "scipy", "scikit-learn==0.24.1"]: dist.install_requires.remove(not_required) -setup(name='talon', - version='1.6.0', - description=("Mailgun library " - "to extract message quotations and signatures."), - long_description=open("README.rst").read(), - author='Mailgun Inc.', - author_email='admin@mailgunhq.com', - url='https://github.com/mailgun/talon', - license='APACHE2', - cmdclass={ - 'install': InstallCommand, - }, - packages=find_packages(exclude=['tests', 'tests.*']), - include_package_data=True, - zip_safe=True, - install_requires=[ - "lxml", - "regex", - "numpy", - "scipy", - "scikit-learn>=1.0.0", - "chardet", - "cchardet", - "cssselect", - "six", - "html5lib", - "joblib", - ], - tests_require=[ - "mock", - "nose", - "coverage" - ] - ) +setup( + name="talon-o2w", + version="1.6.1", + description=( + "Mailgun library " "to extract message quotations and signatures." + ), + long_description=open("README.rst").read(), + author="Mailgun Inc.", + author_email="admin@mailgunhq.com", + url="https://github.com/mailgun/talon", + license="APACHE2", + cmdclass={ + "install": InstallCommand, + }, + packages=find_packages(exclude=["tests", "tests.*"]), + include_package_data=True, + zip_safe=True, + install_requires=[ + "lxml", + "regex", + "numpy", + "scipy", + "scikit-learn>=1.0.0", + "chardet", + # "cchardet", + "cssselect", + "six", + "html5lib", + "joblib", + ], + tests_require=["mock", "nose", "coverage"], +)