3

For the current open source I'm working on I need to create a Python package (that I'll be using as dependency) that wrap an existing C++ library released using Boost license.

I'll be shipping this Python wrapper/package using pip, so I need to define a setup.py file. setup.py should contain informations about author name, support email and licensing.

What should I report as author and licensing in setup.py?

2

If your redistribution combines Boost-licensed code and your own source code in one source or binary package you will need to provide licensing for both. In the simpler case where you would elect to license your own code to be using the Boost license, then there is only one license and possibly multiple copyright statements. You can add these alright in the setup.py license metadata field. A great practice would be to use SPDX license identifiers (if needed as a license expression if you use more than one license) for the license field. You can also add a proper license classifier in the classifiers list field of your setup.py if there is one that applies well ... But I could not find a Boost license classifier even though this is an License :: OSI Approved license...

And typically you would also add a LICENSE file at the root for clarity, ensuring that it is included in the build source package with a proper entry in the MANIFEST.in file.

If you plan to also ship pre-built wheels you should also consider creating a setup.cfg with these lines to ensure that your LICENSE file is also included in the built wheels: [metadata] license_file = LICENSE

From a setup.py point of view, if you are clearly the author of the wrapper then you should add yourself in the author field. If you are merely packaging the C++ code without much of new code addition you could be the maintainer and the original author the author. Your call.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.