Mercurial > sat_docs
comparison flatpak/build_manifest.py @ 140:e23e414987d7
flatpak (build_manifest): --no-binary is currently disabled as version parsing doesn't handle yet wheel packages.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 23 Jun 2019 18:12:01 +0200 |
parents | d36a68e396d5 |
children | 9201caf7b2a8 |
comparison
equal
deleted
inserted
replaced
139:d36a68e396d5 | 140:e23e414987d7 |
---|---|
128 help='ignore the cache of this step ("all" to ignore all caches)') | 128 help='ignore the cache of this step ("all" to ignore all caches)') |
129 build_group.add_argument( | 129 build_group.add_argument( |
130 '--deps-dir', | 130 '--deps-dir', |
131 help="use this directory to build_group python dependencies (it won't be deleted at " | 131 help="use this directory to build_group python dependencies (it won't be deleted at " |
132 "the end, useful when you want to re-use it and avoir re-downloading)") | 132 "the end, useful when you want to re-use it and avoir re-downloading)") |
133 build_group.add_argument('--no-binary', help="don't use binary packages") | 133 # build_group.add_argument('--no-binary', help="don't use binary packages") |
134 | 134 |
135 # export group | 135 # export group |
136 export_group.add_argument('-s', '--symlink', choices=['no', 'all', 'cache'], | 136 export_group.add_argument('-s', '--symlink', choices=['no', 'all', 'cache'], |
137 default='no', | 137 default='no', |
138 help='"no" to copy all files, "all" to symlink all files, "cache" to copy files ' | 138 help='"no" to copy all files, "all" to symlink all files, "cache" to copy files ' |
146 # common | 146 # common |
147 parser.add_argument('name', type=str, help="name of the package to build_group") | 147 parser.add_argument('name', type=str, help="name of the package to build_group") |
148 parser.add_argument('version', type=str, help="version of the package to build_group") | 148 parser.add_argument('version', type=str, help="version of the package to build_group") |
149 | 149 |
150 args = parser.parse_args() | 150 args = parser.parse_args() |
151 # FIXME: no_binary is currently not managed because version parser doesn't handle | |
152 # wheels | |
153 args.no_binary = True | |
151 | 154 |
152 if 'all' in args.ignore_cache and len(args.ignore_cache) != 1: | 155 if 'all' in args.ignore_cache and len(args.ignore_cache) != 1: |
153 parser.error('"all" cannot be used with step names in --ignore-cache, ' | 156 parser.error('"all" cannot be used with step names in --ignore-cache, ' |
154 'use it alone') | 157 'use it alone') |
155 | 158 |
822 sys.exit(0) | 825 sys.exit(0) |
823 parser = etree.XMLParser(remove_blank_text=True) | 826 parser = etree.XMLParser(remove_blank_text=True) |
824 tree = etree.parse(template_file, parser) | 827 tree = etree.parse(template_file, parser) |
825 root = tree.getroot() | 828 root = tree.getroot() |
826 if args.version == 'dev': | 829 if args.version == 'dev': |
827 print("addind release data for dev version") | 830 print(f"addind release data for dev version ({dev_version_rev})") |
828 releases_elt = root.find('releases') | 831 releases_elt = root.find('releases') |
829 if releases_elt is None: | 832 if releases_elt is None: |
830 raise ValueError( | 833 raise ValueError( |
831 "<releases/> element is missing in appdata template, please add it") | 834 "<releases/> element is missing in appdata template, please add it") |
832 release_elt = etree.SubElement( | 835 release_elt = etree.SubElement( |
838 ) | 841 ) |
839 description_elt = etree.SubElement(release_elt, 'description') | 842 description_elt = etree.SubElement(release_elt, 'description') |
840 text_lines = APPDATA_RELEASE_DEV_TEXT.strip().split('\n') | 843 text_lines = APPDATA_RELEASE_DEV_TEXT.strip().split('\n') |
841 for text in text_lines: | 844 for text in text_lines: |
842 etree.SubElement(description_elt, 'p').text = text | 845 etree.SubElement(description_elt, 'p').text = text |
843 print(f"release data added for this version ({dev_version_rev})") | |
844 | 846 |
845 with open(appdata_file, "wb") as f: | 847 with open(appdata_file, "wb") as f: |
846 f.write(etree.tostring(root, encoding="utf-8", xml_declaration=True, | 848 f.write(etree.tostring(root, encoding="utf-8", xml_declaration=True, |
847 pretty_print=True)) | 849 pretty_print=True)) |
848 | 850 |