PyCon 2014

Publicando y manteniendo un proyecto de software libre desarrollado con Python

Carl Meyer  · 

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

good afternoon everyone thank you so much this is the last session I want you guys to give yourselves a round of applause you made it I hope you guys had a fantastic time this has been a great conference just final note i do want to push the sprints one last

time as you may well know this is not the last day of pike on their arse development sprints happening tomorrow onwards and this is the best time to work with the world's best Python programmers the world's best minds in the you know like in this city

you have the advantage of working on high-profile projects like mercurial and pi PI and pyramid and all sorts of other projects including getting help for your own projects at the end of the lightning talks which I highly encourage that you go to you will

be able to pitch for 20 seconds one of our products that you want to have help with please go there pitch a project but any kind of project that you've wanted to have advice on even if it's really a little hobby thing go and pitch it show up to the

sprints or if you get really excited about someone else's project please go and contributes the best way to get started in open source now it's my pleasure to introduce Carl Meyer who when he's not hacking on Python plays a mean ultimate frisbee

and he's going to be talking about setting your code free releasing and maintaining an open-source Python library please a big round of pause thank you I'm Carl Meyer I work for odd bird we build web applications and do Python code consultation and

review so if you want to hire us you can let me know I'll be talking about releasing and maintaining your first open source Python library the premise of this talk is that you have code writing that code is outside the scope of this particular talk we

presume that you have it already we're presuming also that you want me to use your code and the particular means is via pip install there's other methods of getting your code to users web application deployment or creating GUI installers or operating

system packages those methods of getting code to users are also outside the scope of this talk will be discussing pip install and the other premise is that you want me to contribute to your code and presumably you want to be able to accept my contributions

without breaking your software or losing your sanity so you look up some documentation on the internet about how to do this with a python project and you may find more than one source of information and documentation and more than one relevant project and

it might be a little confusing finding your way through and navigating the various advice and documentation when you're doing something for the first time too many choices can kill your motivation to finish it so this talk the idea is to present a set

of rails for releasing and maintaining your first open source python project it's not the only way to do it there are many choices that you could make this is one set of choices that can work so we'll be long on opinions here short on choices the idea

is from 0 to awesome in 20 minutes some of the awesome that will have after 20 minutes are over includes public HTML documentation with a responsive theme that automatically updates when you push to your repo tests that automatically run every time you push

to your repository a pip install working and a project that's welcoming to new contributors and if you've done this before or if you're already the owner of a Python open source project hopefully you'll still pick up a new trick or two the

roadmap for this presentation includes talking about project structure choosing a license where to host your code your documentation testing and continuous integration packaging your code so people can install it and setting up a community around your project

that's welcoming to new contributors here's a bare-bones project structure for a hypothetical project I've named the hypothetical project PI fly which I was shocked to discover is not yet registered on the Python package index so consider this

the zero day for that we'll see who's the first to register it and build something under that name we'll have a docs directory within our outer repository directory where a documentation will live will have a top-level python package containing

all of your python code that's marked with at least under in it pi file and probably some other python modules will have a test directory where our tests live a license file manifests dot in we'll talk about a little later a readme and a setup pi which

is what makes your package installable by other users the first decision you have to make if you're going to release some code is open source is what license you will release it under obligatory disclaimer I'm not a lawyer none of what's on this

slide is legal advice but your license is the conditions under which I may use your code if you don't have a license the default is all rights reserved so the fact that you've pushed your code to github does not mean i can use it if it doesn't

have an open source licence then you have not given me any conditions under which i'm allowed to use your code if you aren't sure what license to use i recommend starting with bsd or MIT license these are less restrictive open-source licenses essentially

all you asked from your users is that if they modify or redistribute your code they preserve your name attached to it so you keep your credit for writing the code and they preserve the license under which you release the code that you wrote so if your interest

isn't having people use your software almost anyone can use your software under those conditions other reasonable alternatives if you know why you need them include the GPL or lgpl the apache license or the mozilla public license the GPL in particular

is a bit more restrictive it requires anyone redistributing or modifying your code to release all of their contributions under the same license if you're concerned about freeloaders you may think about that it will probably mean that some people choose

not to use your software so that's the trade-off don't use any other licenses besides these the goal the goal of the license is to clarify for someone else the terms under which they can use their software and reduce their concern that they'll

be getting into legal trouble by using yourself twere if you use a less well-known license you're simply giving potential users of your software a reason to question whether it's safe to use you don't want someone considering using your code to

[ ... ]

Nota: se han omitido las otras 3.291 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.