tinyfpga / TinyFPGA-Bootloader

An open source USB bootloader for FPGAs
Apache License 2.0
352 stars 94 forks source link

setup.py: generate single line description= #37

Closed ewenmcneill closed 5 years ago

ewenmcneill commented 5 years ago

@mithro, the Summary: field (from description=) needs to be a single line, so replace newlines with spaces, and strip trailing white space.

Existing PyPI PKG-INFO has:

ewen@parthenon:/tmp/tinyprog-dev/EGG-INFO$ head -8 PKG-INFO 
Metadata-Version: 2.1
Name: tinyprog
Version: 1.0.24.dev16
Summary: Programmer for FPGA boards using the TinyFPGA USB Bootloader
(http://tinyfpga.com).

Home-page: https://github.com/tinyfpga/TinyFPGA-Bootloader/
Author: Luke Valenty
ewen@parthenon:/tmp/tinyprog-dev/EGG-INFO$ 

but AFAICT we need:

ewen@parthenon:/tmp/tinyprog/tinyprog-1.0.24.dev15+g74ae5c0.d20190118$ head -8 PKG-INFO 
Metadata-Version: 2.1
Name: tinyprog
Version: 1.0.24.dev15+g74ae5c0.d20190118
Summary: Programmer for FPGA boards using the TinyFPGA USB Bootloader (http://tinyfpga.com).
Home-page: https://github.com/tinyfpga/TinyFPGA-Bootloader/
Author: Luke Valenty
Author-email: luke@tinyfpga.com
License: GPLv3+
ewen@parthenon:/tmp/tinyprog/tinyprog-1.0.24.dev15+g74ae5c0.d20190118$ 

as generated when we strip out these stray newlines in the description= values.

python setup.py sdist seems to produce sensible looking PKG-INFO now, but I've obviously not tried uploading this to PyPI. At minimum I think it should be better than now.

Ewen

mithro commented 5 years ago

Testing the build here -> https://travis-ci.com/mithro/TinyFPGA-Bootloader/builds/97766350

mithro commented 5 years ago

I tried to be clever and it backfired. Trying again at https://travis-ci.com/mithro/TinyFPGA-Bootloader/builds/97766679

mithro commented 5 years ago

Ha... HTTPError: 400 Client Error: Invalid value for classifiers. Error: 'Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7' is not a valid choice for this field for url: https://upload.pypi.org/legacy/

mithro commented 5 years ago

Next build.. https://travis-ci.com/mithro/TinyFPGA-Bootloader/builds/97767122

mithro commented 5 years ago

The output looks better -> https://pypi.org/project/tinyprog/1.0.24.dev17/

mithro commented 5 years ago

Ahh, you don't have my newer setuptools...

mithro commented 5 years ago

This now works! https://pypi.org/project/tinyprog/1.0.24.dev18/