1
0
mirror of https://github.com/google/fonts.git synced 2024-12-17 13:41:32 +03:00
fonts/lang/setup.py

59 lines
2.0 KiB
Python
Raw Normal View History

Initial implementation of the `languages` module. This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: * [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) * [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) * [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration.
2022-02-16 10:49:46 +03:00
# coding: utf-8
#
Initial implementation of the `languages` module. This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: * [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) * [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) * [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration.
2022-02-16 10:49:46 +03:00
# Copyright 2022 The Google Fonts Tools Authors.
2022-03-04 23:30:55 +03:00
# Copyright 2017,2022 Google LLC All Rights Reserved.
Initial implementation of the `languages` module. This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: * [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) * [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) * [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration.
2022-02-16 10:49:46 +03:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# See AUTHORS.txt for the list of Authors and LICENSE.txt for the License.
from setuptools import setup
# Read the contents of the README file
with open('README.md') as f:
long_description = f.read()
setup(
name="gflanguages",
use_scm_version={"write_to": "Lib/gflanguages/_version.py"},
2022-03-10 02:09:15 +03:00
url='https://github.com/googlefonts/lang/',
Initial implementation of the `languages` module. This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: * [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) * [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) * [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration.
2022-02-16 10:49:46 +03:00
description='A python API for evaluating language support in the Google Fonts collection.',
long_description=long_description,
long_description_content_type='text/markdown', # This is important!
author=('Dave Crossland, '
'Felipe Sanches, '
'Marc Foley, '
'Roderick Sheeter'),
author_email='dave@lab6.com',
package_dir={'': 'Lib'},
packages=['gflanguages'],
package_data={'gflanguages': [
2022-02-17 00:48:31 +03:00
"data/languages/*.textproto",
"data/regions/*.textproto",
"data/scripts/*.textproto"
]
},
Initial implementation of the `languages` module. This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: * [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) * [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) * [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration.
2022-02-16 10:49:46 +03:00
zip_safe=False,
classifiers=[
'Intended Audience :: Developers',
'Topic :: Text Processing :: Fonts',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3'
],
python_requires=">=3.7",
setup_requires=['setuptools_scm>=4,<6.1'],
install_requires=[
'protobuf'
Initial implementation of the `languages` module. This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: * [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) * [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) * [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration.
2022-02-16 10:49:46 +03:00
]
)