diff --git a/MANIFEST.in b/MANIFEST.in index 9bbeb77..49d39ee 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,4 @@ include LICENSE.txt include MANIFEST.in include README.rst include CHANGES.md -include setup.cfg -include setup.py recursive-include tests *.py diff --git a/emoji/__init__.py b/emoji/__init__.py index ae75b34..affdc56 100644 --- a/emoji/__init__.py +++ b/emoji/__init__.py @@ -1,17 +1,3 @@ -""" -emoji for Python -~~~~~~~~~~~~~~~~ - -emoji terminal output for Python. - - >>> import emoji - >>> print(emoji.emojize('Python is :thumbsup:', language='alias')) - Python is 👍 - >>> print(emoji.emojize('Python is :thumbs_up:')) - Python is 👍 -""" - - from emoji.core import * from emoji.unicode_codes import * @@ -26,37 +12,3 @@ ] __version__ = '2.11.1' -__author__ = 'Taehoon Kim, Kevin Wurster' -__email__ = 'carpedm20@gmail.com' -# and wursterk@gmail.com, tahir.jalilov@gmail.com -__source__ = 'https://github.com/carpedm20/emoji/' -__license__ = ''' -New BSD License - -Copyright (c) 2014-2024, Taehoon Kim, Kevin Wurster -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The names of its contributors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -''' diff --git a/pyproject.toml b/pyproject.toml index 5fe797f..44845c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,57 @@ [build-system] requires = ["setuptools>=59.6.0"] build-backend = "setuptools.build_meta" + +[project] +name = "emoji" +description = "Emoji for Python" +readme = "README.rst" +requires-python = ">=3.6" +authors = [ + {name = "Taehoon Kim", email = "carpedm20@gmail.com"}, + {name = "Kevin Wurster", email = "wursterk@gmail.com"}, +] +keywords = ["emoji"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Multimedia :: Graphics :: Presentation", + "Topic :: Software Development :: Libraries :: Python Modules", + "Typing :: Typed" +] +dependencies = [] +dynamic = ["version"] + +[project.urls] +homepage = "https://github.com/carpedm20/emoji/" +repository = "https://github.com/carpedm20/emoji/" + +[project.optional-dependencies] +dev = [ + "pytest", + "coverage", + "coveralls", +] + +[tool.setuptools.packages.find] +include = ["emoji*"] + +[tool.setuptools.package-data] +emoji = ["py.typed"] + +[tool.setuptools.dynamic] +version = {attr = "emoji.__version__"} diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 665de89..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[bdist_wheel] -universal = 1 - -[metadata] -license_files = LICENSE.txt diff --git a/setup.py b/setup.py deleted file mode 100644 index 9e774f4..0000000 --- a/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - - -"""Setup script for emoji.""" - - -import os -from codecs import open - -from setuptools import setup - -with open('README.rst', encoding='utf-8') as f: - readme_content = f.read().strip() - - -author = email = source = version = None -with open(os.path.join('emoji', '__init__.py'), encoding='utf-8') as f: - for line in f: - if line.strip().startswith('__version__'): - version = line.split('=')[1].strip().replace('"', '').replace("'", '') - elif line.strip().startswith('__author__'): - author = line.split('=')[1].strip().replace('"', '').replace("'", '') - elif line.strip().startswith('__email__'): - email = line.split('=')[1].strip().replace('"', '').replace("'", '') - elif line.strip().startswith('__source__'): - source = line.split('=')[1].strip().replace('"', '').replace("'", '') - elif None not in (version, author, email, source): - break - -setup( - name='emoji', - author=author, - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', - author_email=email, - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: Information Technology', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Programming Language :: Python', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Multimedia :: Graphics :: Presentation', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Typing :: Typed' - ], - description='Emoji for Python', - keywords=['emoji'], - extras_require={ - 'dev': [ - 'pytest', - 'coverage', - 'coveralls', - ], - }, - include_package_data=True, - license='New BSD', - long_description=readme_content, - packages=['emoji', 'emoji.unicode_codes'], - package_data={ - 'emoji': [ - 'py.typed', - '*.pyi', - ], - 'emoji.unicode_codes': [ - 'py.typed', - '*.pyi', - ], - }, - url=source, - version=version, - zip_safe=True, -)