Name: python-emoji-country-flag Version: 2.1.0 Release: %autorelease # Fill in the actual package summary to submit package to Fedora Summary: Flag emoji from country codes for Python # Check if the automatically generated License and its spelling is correct for Fedora # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ License: MIT URL: https://github.com/cvzi/flag Source: %{pypi_source emoji_country_flag} BuildArch: noarch BuildRequires: python3-devel # Fill in the actual package description to submit package to Fedora %global _description %{expand: Flag emoji for Python. Converts flag emoji to ASCII and other way round. This is based on http://schinckel.net/2015/10/29/unicode-flags-in-python/ by schinckel How it works ============ All the flag emoji are actually composed of two unicode letters. These are the 26 regional indicator symbols. Alone they look like this: 🇦 🇧 🇨 🇩 🇪 🇫 🇬 🇭 🇮 🇯 🇰 🇱 🇲 🇳 🇴 🇵 🇶 🇷 🇸 🇹 🇺 🇻 🇼 🇽 🇾 🇿 If you pair them up according to ISO 3166 some browsers and phones will display a flag. For example TW is Taiwan: 🇹 + 🇼 = 🇹🇼 So, to encode an ASCII code like :TW: to 🇹🇼, we just need to convert the ASCII T and W to the corresponding regional indicator symbols 🇹 and 🇼. To reverse it, we translate the regional indicator symbols back to ASCII letters.} %description %_description %package -n python3-emoji-country-flag Summary: %{summary} %description -n python3-emoji-country-flag %_description # For official Fedora packages, review which extras should be actually packaged # See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras %pyproject_extras_subpkg -n python3-emoji-country-flag docs,ruff,test # coverage, %prep %autosetup -p1 -n emoji_country_flag-%{version} %generate_buildrequires # Keep only those extras which you actually want to package or use during tests %pyproject_buildrequires -x docs,ruff,test # coverage, %build %pyproject_wheel %install %pyproject_install # Add top-level Python module names here as arguments, you can use globs %pyproject_save_files -l flag %check %pyproject_check_import %files -n python3-emoji-country-flag -f %{pyproject_files} %changelog %autochangelog