You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tools that update the pyOpenSci contributor and review metadata
180
+
that is posted on our website
181
+
"""
182
+
```
176
183
177
-
If you have two authors you can add them like this:
184
+
When you add authors and maintainers you need to use a format that will look like a Python list with a dictionary within it:
185
+
186
+
```toml
187
+
authors = [
188
+
{ name = "Firstname Lastname", email = "email@pyopensci.org"},
189
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" }
190
+
]
178
191
179
-
`authors = [{ name = "Firstname lastname", email = "email@pyopensci.org" }, { name = "Firstname lastname", email = "email@pyopensci.org" }]`
192
+
maintainers = [
193
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" },
194
+
{ name = "New Friend", email = "newbie@pyopensci.org" }
195
+
]
196
+
```
180
197
181
198
:::{admonition} Author names & emails
182
199
:class: note
183
200
184
201
There is a quirk with PyPI for authors that have names but not emails in the pyproject.toml. If you are missing the email for one or more authors or maintainers, like this:
185
202
186
203
```toml
187
-
maintainers = [{ name = "Firstname lastname", email = "email@pyopensci.org" }, { name = "Firstname lastname" }]
204
+
maintainers = [
205
+
{ name = "Firstname lastname", email = "email@pyopensci.org" },
206
+
{ name = "Firstname lastname" }
207
+
]
188
208
```
189
209
190
210
Then we suggest that you only provide names in your list of names to ensure that everything renders properly on your PyPI page - like this:
191
211
192
212
```toml
193
-
maintainers = [{ name = "Firstname lastname"}, { name = "Firstname lastname" }]
213
+
maintainers = [
214
+
{ name = "Firstname lastname"},
215
+
{ name = "Firstname lastname" }
216
+
]
194
217
```
195
218
196
219
don't have emails for everyone, we suggest that you only add names.
@@ -199,7 +222,7 @@ don't have emails for everyone, we suggest that you only add names.
199
222
200
223
Your `pyproject.toml` file now should look like the example below. It is OK if you only have 1 author and the same author is also maintainer of your package:
maintainers = [{ name = "Firstname lastname", email = "email@pyopensci.org" }, { name = "Firstname lastname", email = "email@pyopensci.org" }]
282
+
description = """
283
+
Tools that update the pyOpenSci contributor and review metadata
284
+
that is posted on our website
285
+
"""
286
+
authors = [
287
+
{ name = "Firstname Lastname", email = "email@pyopensci.org"},
288
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" }
289
+
]
290
+
maintainers = [
291
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" },
292
+
{ name = "New Friend", email = "newbie@pyopensci.org" }
293
+
]
253
294
readme = "README.md"
254
-
license = {file = 'LICENSE'}
295
+
license = {file = "LICENSE"}
255
296
```
256
297
### Step 3: Specify Python version with `requires-python`
257
298
258
299
Finally, add the `requires-python` field to your `pyproject.toml``[project]` table. The `requires-python` field, helps pip understand the lowest version of Python that you package supports when it's installed. It is thus a single value.
maintainers = [{ name = "Firstname lastname", email = "email@pyopensci.org" }, { name = "Firstname lastname", email = "email@pyopensci.org" }]
349
+
description = """
350
+
Tools that update the pyOpenSci contributor and review metadata
351
+
that is posted on our website
352
+
"""
353
+
authors = [
354
+
{ name = "Firstname Lastname", email = "email@pyopensci.org"},
355
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" }
356
+
]
357
+
maintainers = [
358
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" },
359
+
{ name = "New Friend", email = "newbie@pyopensci.org" }
360
+
]
302
361
readme = "README.md"
303
362
license = {file = 'LICENSE'}
304
363
requires-python = ">=3.10"
@@ -354,7 +413,7 @@ The classifier key should look something like the example below. A few notes:
354
413
- Your classifier values might be different depending upon the license you have selected for your package, your intended audience, development status of your package and the Python versions that you support
355
414
- You can add as many classifiers as you wish as long as you use the [designated PyPI classifier values](https://PyPI.org/classifiers/).
maintainers = [{ name = "Firstname lastname", email = "email@pyopensci.org" }, { name = "Firstname lastname", email = "email@pyopensci.org" }]
425
+
description = """
426
+
Tools that update the pyOpenSci contributor and review metadata
427
+
that is posted on our website
428
+
"""
429
+
authors = [
430
+
{ name = "Firstname Lastname", email = "email@pyopensci.org"},
431
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" }
432
+
]
433
+
maintainers = [
434
+
{ name = "Secondperson Fullname", email = "email2@pyopensci.org" },
435
+
{ name = "New Friend", email = "newbie@pyopensci.org" }
436
+
]
369
437
readme = "README.md"
370
438
license = {file = 'LICENSE'}
371
439
requires-python = ">=3.10"
@@ -379,7 +447,8 @@ classifiers = [
379
447
"License :: OSI Approved :: MIT License",
380
448
"Programming Language :: Python :: 3 :: Only",
381
449
"Programming Language :: Python :: 3.10",
382
-
"Programming Language :: Python :: 3.11",]
450
+
"Programming Language :: Python :: 3.11",
451
+
]
383
452
```
384
453
385
454
Note that while classifiers are not required in your `pyproject.toml` file, they will help users find your package. As such we strongly recommend that you add them.
@@ -394,7 +463,7 @@ Finally, add the project.urls table to your pyproject.toml file.
394
463
-**Bug reports:** a link to your issues / discussions or wherever you want users to report bugs.
395
464
-**Source:** the GitHub / GitLab link for your project.
0 commit comments