Commit Graph

215 Commits

Author SHA1 Message Date
con-f-use 4835f01c41 use finalize_distribution_options entrypoint order
fixes #1993
2020-02-15 17:01:22 +01:00
Hugo 796abd8dbe Fix for Python 4: replace unsafe six.PY3 with PY2 2020-01-08 19:10:11 +02:00
Jason R. Coombs 1a5d06b584
Merge pull request #1877 from pypa/feature/distribution-options-hooks
Add new hook 'setuptools.finalize_distribution_options'
2019-11-23 14:40:44 -05:00
Jason R. Coombs 68dbb70370
Merge pull request #1767 from kchmck/feat-license-files
Add support for `license_files` option in metadata
2019-11-16 15:19:37 -05:00
Jason R. Coombs 6b210c6593 Move all finalization of distribution options into hooks. Allow hooks to specify an index for ordering. 2019-11-16 12:06:47 -05:00
Benoit Pierre d6948c636f dist: re-implement `fetch_build_egg` to use pip 2019-11-15 20:06:07 +01:00
Mick Koch 4a31168e51 Use an OrderedSet for accumulating license files 2019-10-28 18:49:31 -04:00
Mick Koch 823ab9d2ec Add support for `license_files` option in metadata 2019-10-28 18:30:31 -04:00
Jason R. Coombs 4c22a6ca57 Add new hook 'setuptools.finalize_distribution_options' for plugins like 'setuptools_scm' to alter distribution options. 2019-10-18 20:37:42 -04:00
Jason R. Coombs b3ef77b208
Merge branch 'master' into feature/deterministic-provides-extras 2019-09-11 18:07:45 +01:00
Daniel Himmelstein 8f848bd777 improve `package_data` check
Ensure the dictionary values are lists/tuples of strings.

Fix #1459.
2019-07-16 13:20:36 +02:00
Daniel Himmelstein 305bb1cefc fix assert_string_list docstring
value=None raises TypeError

DistutilsSetupError: 2 must be a list of strings (got None)
2019-07-16 12:46:59 +02:00
Bastian Venthur 880ff4a357 Force metadata-version = 1.2 when project urls are present.
Closes: #1756
2019-05-16 12:46:50 +02:00
Jason R. Coombs 85fa4a6bc5 When reading config files, require them to be encoded with UTF-8. Fixes #1702. 2019-04-05 10:30:47 -04:00
Jason R. Coombs 393809a02e Feed the hobgoblins (delint). 2019-04-05 09:27:23 -04:00
Dustin Ingram c27c705f6a Fix typo in docstring (#1718) 2019-03-16 13:06:53 -04:00
Frédéric Chapoton 16e452a42a Remove duplicate import io (#1713)
Found by lgtm
2019-03-06 09:22:28 -05:00
Jason R. Coombs 636070d992 Use an ordered set when constructing 'extras provided'. Ref #1305. 2019-02-17 17:09:26 -05:00
Jason R. Coombs 9150b6b727 Prefer native strings on Python 2 when reading config files. Fixes #1653. 2019-01-28 18:09:50 -05:00
Jason R. Coombs 249f24a1f0 Fix test failure by better detecting string options from an updated ConfigParser. 2019-01-26 21:48:38 -05:00
Jason R. Coombs b1615d1243 Adopt distutils.dist.Distribution._set_command_options to support better string detection. 2019-01-26 21:45:33 -05:00
Jason R. Coombs 24be5abd4c Given that the config file parsing functionality is unlikely to change upstream, just incorporate the functionality directly. 2019-01-25 16:11:07 -05:00
Jason R. Coombs 992aa3dfba Merge branch 'master' into fix_889_and_non-ascii_in_setup.cfg_take_2 2019-01-25 15:49:59 -05:00
Paul Ganssle ac3cee396f
Fix issue with missing author metadata
Prior to this patch, if the author or author_email were omitted from
`setup`, a malformed `PKG-INFO` would be created.
2018-11-12 22:39:09 -05:00
Paul Ganssle c34962d081
Use write_field in write_pkg_file
This creates a wrapper function for writing fields in the PKG-INFO file,
both to simplify the syntax and to add a point where we can inject an
encoding function in order to support Python 2.7 compatibility.
2018-11-07 17:38:42 -05:00
Paul Ganssle 386fcdbe02
Start patching DistributionMetadata.read_pkg_file
This turns get_metadata_version into a method on DistributionMetadata,
populated either by inferrence (in the case of package metadata
specified in `setup`) or from the data in a specified PKG-INFO file.

To populate metadata_version from PKG-INFO, we need to monkey patch
read_pkg_file in addition to write_pkg_file.
2018-11-07 17:38:41 -05:00
Paul Ganssle e5d362d373
Store metadata version on metadata object 2018-11-07 17:38:41 -05:00
Paul Ganssle 83fb238551
Add DistributionMetadata.read_pkg_file
This is the baseline, unchanged from the version in distutils.dist, to
be modified before patching.
2018-11-07 17:38:40 -05:00
Junhan Huang 5854b0eba0 Add custom deprecation warning classes
`DeprecationWarning` is not visible by default in the latest versions of
CPython, so this switches the deprecation warnings in setuptools and
pkg_resources over to custom classes derived from `Warning` instead.

Fixes issue github issue #159

Co-authored-by: Junhan Huang <robin.j.huang@gmail.com>
Co-authored-by: Marton Pono <marci93@gmail.com>
2018-10-28 17:43:24 -04:00
Ian Wienand 07cd2e4e71 Allow setting long_description_content_type externally
Some tools, such as PBR, might want to set
long_description_content_type during the parent object's
Distribution.__init__() call (during distutils setup_keywords entry
points).  However, that field is currently unconditionally overwritten
after these calls, erasing the value.

We would rather not duplicate the existing method of copying into
dist.metadata as done with project_urls.

This preserves the fields within Distribution.metadata described by
self._DISTUTIULS_UNUPPORTED_METADATA, or otherwise takes it from
arguments.

A test case that simulates setting the long description and overriding
the arguments is added.
2018-05-17 07:22:25 +10:00
Paul Ganssle a0723a66bf
Stop patching write_pkg_info 2018-03-18 11:43:00 -04:00
Jason R. Coombs d92bc63ddd Delint 2018-03-18 09:55:59 -04:00
Jason R. Coombs c14a674e89 When possible, avoid test-specific interfaces in production code. 2018-03-18 09:41:28 -04:00
Paul Ganssle f78c489384
Fix issue with unicode author/maintainer on PY2 2018-03-17 19:59:45 -04:00
Jason R. Coombs 929acc4e55 Setuptools now vendors its own direct dependencies (packaging, six, pyparsing). Ref #1296. 2018-03-17 14:10:32 -04:00
Jason R. Coombs cb9b879355 Merge branch 'master' into HEAD 2018-03-17 10:30:34 -04:00
Paul Ganssle d8170d79a1
Add support for maintainer in PKG-INFO
Per PEP 345, metadata Version 1.2 should support the Author,
Maintainer, Author-Email and Maintainer-Email fields.
2018-03-16 19:54:54 -04:00
wim glenn 1fffc0eff9
address review comments and squash the empty string extra earlier 2018-03-16 14:27:42 -05:00
wim glenn 696afcad2d
fix for regression - spurious "Provides-Extra:" generated in metadata 2018-03-16 01:17:06 -05:00
Dustin Ingram b2ea3c4a20
Updates for PEP 566 (Metadata 2.1) 2018-03-14 17:02:25 -05:00
Jason R. Coombs 82c7b79892
Remove extraneous attribute copy, artifact of bad merge. 2018-01-04 20:46:17 -05:00
Jason R. Coombs c0edf9323c
Merge branch 'master' into master 2018-01-04 20:42:12 -05:00
Jason R. Coombs 23b940e9fb
Merge pull request #1207 from cryvate/fix-issue-1206
Add setup.cfg support for long_description_content_type
2018-01-04 20:33:25 -05:00
Henk-Jaap Wagenaar 780a6f161e Rework how to handle long_description_content_type 2017-11-25 18:55:58 +00:00
Jason R. Coombs f012485e47 Disallow unordered sequences for specifying install_requires. Fixes #458. 2017-11-25 09:45:05 -05:00
Jeremy Stanley df2246449c Support PEP 345 Project-URL metadata
By including one or more Project-URL entries in PKG-INFO metadata,
PyPI can display helpful hyperlinks in a generic manner. Add support
here to be able to pass it through setup.cfg and setup.py with a
project_urls dict. See the corresponding section of the Core
Metadata Specifications from the Python Packaging User Guide for
details:

https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
2017-11-22 19:24:12 +00:00
Henk-Jaap Wagenaar 553e21e12c Add setup.cfg support for long_description_content_type (in line with docs). 2017-11-21 22:16:53 +00:00
Benoit Pierre 2c897b5b87 improve encoding handling for `setup.cfg`
Support the same mechanism as for Python sources for declaring
the encoding to be used when reading `setup.cfg` (see PEP 263),
and return the results of reading it as Unicode.

Fix #1062 and #1136.
2017-10-25 23:16:15 +02:00
Benoit Pierre 472c79f95c support `setup_requires` in setup.cfg 2017-10-16 21:09:12 +02:00
Jason R. Coombs 45bc4b9913 Merge branch 'master' into pr1127 2017-09-03 13:33:20 -04:00