[Distutils] org-mode README file formats

2018-05-07 Thread Diane Trout
Hi,

I was building a package where I had a README.org file, which
setuptools couldn't find.

It listed .md as a valid format, so I was wondering if org-mode was
sufficiently plain text to be added to the list of accepted README file
formats?

For what it's worth, github-markup can handle .org files 
https://github.com/github/markup

Diane
--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/7MM57BTQPZBZJ62K3526GBLLOVZONNAA/


[Distutils] Re: requirements.txt or not requirements.txt?

2018-05-07 Thread Carles Sala Cladellas
Hi!

Thanks for all the useful responses!

I am basically working on libraries that will be distributed on PyPi,
such as https://github.com/HDI-Project/BTB/ and
https://github.com/HDI-Project/ATM/ (Auto Machine Learning and Model
Tuning libraries developed by Data to AI lab, in MIT).

It looks like, in this scenario, the setup.py option seems to be the
most supported one, so we'll probably go for it!

Thanks again!

Carles

On 07/05/18 09:59, Chris Jerdonek wrote:
> What kind of project is it? For example, is it a software library e.g.
> to put on PyPI, or a website application for a company to run? The
> answer to this question will help people answer your question because
> it has a big impact on what practice will be best for you.
>
> —Chris
>
> On Sun, May 6, 2018 at 11:54 PM Carles Sala Cladellas
> > wrote:
>
> Hello here!
>
> TL;DR: Should I use requirements.txt, or should I have my
> dependencies only listed inside setup.py?
>
> Long version:
>
> The two most common ways to have dependencies listed in a python
> package are either having them listed both in setup.py and
> requirements.txt files, or having them only listed in
> requirements.txt and then import them using some
> `parse_requirements` methods.
>
> In the projects which I am currently working on there are five
> lists of requirements:
> - requirements.txt
> - requirements_test.txt
> - requirements_dev.txt
> - install_requires inside setup.py
> - tests_require inside setup.py
>
> I wanted to remove duplicities, so I thought about removing the
> setup.py lists and parse the dependencies from the
> requirements*.txt files.
>
> But then I came across this, https://stackoverflow.com/a/28842733,
> which recommends using a `dev` entry in `extras_require` and then
> using `pip install -e .[dev]` to install them, which could be
> easily extended to also have a `pip install -e .[test]`.
>
> I find this a very clean option, since it reduces the amount of
> files the repository and makes setup.py and makes setup.py
> self-contained.
>
> Are any known drawbacks to this approach? Is it a good way to go?
>
> Regards,
>
> -- 
> Carles Sala Cladellas
> car...@pythiac.com  / +34 666 278 679
>
> https://www.pythiac.com
> Pythia Consulting - Data Science as a Service
>
> --
> Distutils-SIG mailing list
> distutils-sig@python.org 
> https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
> Message archived at
> 
> https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/OQW4VU36WWGESOAYLTV6WWDKX2RKHRD4/
>

-- 
Carles Sala Cladellas
car...@pythiac.com / +34 666 278 679

https://www.pythiac.com
Pythia Consulting - Data Science as a Service

--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/2WHZFYYNY2FKBSCZLSWYIKGSDTHGFXRH/


[Distutils] Re: requirements.txt or not requirements.txt?

2018-05-07 Thread Alessandro Dentella
On Mon, May 07, 2018 at 11:33:44AM +0300, Marius Gedminas wrote:
> On Mon, May 07, 2018 at 08:48:23AM +0200, Carles Sala Cladellas wrote:
> > Hello here!
> >
> > TL;DR: Should I use requirements.txt, or should I have my dependencies only
> > listed inside setup.py?
>
> Short answer: only setup.py, unless you find a reason to also use a
> requirements.txt.
>
> Long answer:
> https://packaging.python.org/discussions/install-requires-vs-requirements/
> and especially https://caremad.io/posts/2013/07/setup-vs-requirement/

+1

let me point out one more thing.

Suppose you have a project 'myproject' that depends on library1 that
depends on library2. library1 doesn't declare dependancies in
setup.py but uses requirements.txt.

'pip install' of myproject will not see the dependency on library2

I personally really appreciate what buildout does in this field. It
relies on setup.py but allows you to take a 'snapshot' of the packages
really used in versions.txt. It's a pinpoint that enter into the play
*only if* setup.py requires that package.

What I really don't like of requirements.txt is that it doesn't
differentiate between required packages and packages that entered as
dependacies of others.



sandro
*:-)


--
Sandro Dentella  *:-)
http://trepalchi.itIl portale degli artisti

http://www.reteisi.org Soluzioni libere per le scuole
http://sqlkit.argolinux.orgSQLkit home page - PyGTK/python/sqlalchemy
--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/FJU2AKIPW5JWKGBVK5EFBILTB5XUS6KS/


[Distutils] Re: requirements.txt or not requirements.txt?

2018-05-07 Thread Marius Gedminas
On Mon, May 07, 2018 at 08:48:23AM +0200, Carles Sala Cladellas wrote:
> Hello here!
> 
> TL;DR: Should I use requirements.txt, or should I have my dependencies only
> listed inside setup.py?

Short answer: only setup.py, unless you find a reason to also use a
requirements.txt.

Long answer:
https://packaging.python.org/discussions/install-requires-vs-requirements/
and especially https://caremad.io/posts/2013/07/setup-vs-requirement/

> But then I came across this, [1]https://stackoverflow.com/a/28842733, which
> recommends using a `dev` entry in `extras_require` and then using `pip install
> -e .[dev]` to install them, which could be easily extended to also have a `pip
> install -e .[test]`.
> 
> I find this a very clean option, since it reduces the amount of files the
> repository and makes setup.py and makes setup.py self-contained.
> 
> Are any known drawbacks to this approach? Is it a good way to go?

I like it.  It works nicely for me.

It's not 100% complete approach: sometimes (when I'm working on an
application rather than a tool/library) I also wish to have a list of
concrete version pins with which the application has been known to work,
so I use pip freeze (or pip-tools) to get a requirements.txt with all
the frozen versions.

HTH,
Marius Gedminas
-- 
Everyone generalizes from one example.  At least, I do.
-- Steven Brust


signature.asc
Description: PGP signature
--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/LQXS7TDPAMDXXR2DMH5AAYG42EGHML64/


[Distutils] Re: requirements.txt or not requirements.txt?

2018-05-07 Thread Thomas Kluyver
The recommendation is typically: setup.py for libraries,
requirements.txt for applications. But you may also use requirements.txt
for specific tasks associated with a library, like building the docs.
Donald wrote a blog post which better explains what these two
formats do:https://caremad.io/posts/2013/07/setup-vs-requirement/


On Mon, May 7, 2018, at 7:48 AM, Carles Sala Cladellas wrote:
> Hello here!
> 
>  TL;DR: Should I use requirements.txt, or should I have my
>  dependencies only listed inside setup.py?> 
>  Long version:
> 
>  The two most common ways to have dependencies listed in a python
>  package are either having them listed both in setup.py and
>  requirements.txt files, or having them only listed in
>  requirements.txt and then import them using some `parse_requirements`
>  methods.> 
>  In the projects which I am currently working on there are five lists
>  of requirements:>  - requirements.txt
>  - requirements_test.txt
>  - requirements_dev.txt
>  - install_requires inside setup.py
>  - tests_require inside setup.py
> 
>  I wanted to remove duplicities, so I thought about removing the
>  setup.py lists and parse the dependencies from the
>  requirements*.txt files.> 
>  But then I came across this, https://stackoverflow.com/a/28842733,
>  which recommends using a `dev` entry in `extras_require` and then
>  using `pip install -e .[dev]` to install them, which could be easily
>  extended to also have a `pip install -e .[test]`.> 
>  I find this a very clean option, since it reduces the amount of files
>  the repository and makes setup.py and makes setup.py self-contained.> 
>  Are any known drawbacks to this approach? Is it a good way to go?
> 
>  Regards,
>
> -- Carles Sala Cladellas car...@pythiac.com / +34 666 278 679

> https://www.pythiac.com Pythia Consulting - Data Science as a Service> --
> Distutils-SIG mailing list
> distutils-sig@python.org
> https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
> Message archived at
> https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/OQW4VU36WWGESOAYLTV6WWDKX2RKHRD4/
--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/2OXMKOKYOGXGSN4TXVWR5P2LY4AJIAM6/


[Distutils] Re: requirements.txt or not requirements.txt?

2018-05-07 Thread Steve Piercy - Website Builder

On 5/7/18 at 8:48 AM, car...@pythiac.com (Carles Sala Cladellas) pronounced:


But then I came across this, https://stackoverflow.com/a/28842733, which
recommends using a `dev` entry in `extras_require` and then using `pip
install -e .[dev]` to install them, which could be easily extended to
also have a `pip install -e .[test]`.


We use setup.py for Pyramid.
https://github.com/Pylons/pyramid/blob/master/setup.py

Using just setup.py is a common practice going back a long 
time.  It's the first method I learned in Python.


We use `pip install -e .[docs]` to install documentation 
building requirements.  "If it ain't documented, it's broken."  
We also use a pip requirements file (rtd.txt) to build our docs 
on Read The Docs.  RTD effectively does a `pip install -e 
.[docs]` using that file.  So setup.py and pip requirements 
files can be complementary, not mutually exclusive.


--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy  Website Builder  Eugene, OR
   
--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/RQYSCRMTMWJNNF6TA2G5JKAHPQCJKS4V/


[Distutils] Re: requirements.txt or not requirements.txt?

2018-05-07 Thread Chris Jerdonek
What kind of project is it? For example, is it a software library e.g. to
put on PyPI, or a website application for a company to run? The answer to
this question will help people answer your question because it has a big
impact on what practice will be best for you.

—Chris

On Sun, May 6, 2018 at 11:54 PM Carles Sala Cladellas 
wrote:

> Hello here!
>
> TL;DR: Should I use requirements.txt, or should I have my dependencies
> only listed inside setup.py?
>
> Long version:
>
> The two most common ways to have dependencies listed in a python package
> are either having them listed both in setup.py and requirements.txt files,
> or having them only listed in requirements.txt and then import them using
> some `parse_requirements` methods.
>
> In the projects which I am currently working on there are five lists of
> requirements:
> - requirements.txt
> - requirements_test.txt
> - requirements_dev.txt
> - install_requires inside setup.py
> - tests_require inside setup.py
>
> I wanted to remove duplicities, so I thought about removing the setup.py
> lists and parse the dependencies from the requirements*.txt files.
>
> But then I came across this, https://stackoverflow.com/a/28842733, which
> recommends using a `dev` entry in `extras_require` and then using `pip
> install -e .[dev]` to install them, which could be easily extended to also
> have a `pip install -e .[test]`.
>
> I find this a very clean option, since it reduces the amount of files the
> repository and makes setup.py and makes setup.py self-contained.
>
> Are any known drawbacks to this approach? Is it a good way to go?
>
> Regards,
>
> --
> Carles Sala cladellascar...@pythiac.com / +34 666 278 679
> https://www.pythiac.com
> Pythia Consulting - Data Science as a Service
>
> --
> Distutils-SIG mailing list
> distutils-sig@python.org
> https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
> Message archived at
> https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/OQW4VU36WWGESOAYLTV6WWDKX2RKHRD4/
>
--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/XBESNTL7RZ3YGKIVUDXHR4PEF4WS6F34/


[Distutils] requirements.txt or not requirements.txt?

2018-05-07 Thread Carles Sala Cladellas
Hello here!

TL;DR: Should I use requirements.txt, or should I have my dependencies
only listed inside setup.py?

Long version:

The two most common ways to have dependencies listed in a python package
are either having them listed both in setup.py and requirements.txt
files, or having them only listed in requirements.txt and then import
them using some `parse_requirements` methods.

In the projects which I am currently working on there are five lists of
requirements:
- requirements.txt
- requirements_test.txt
- requirements_dev.txt
- install_requires inside setup.py
- tests_require inside setup.py

I wanted to remove duplicities, so I thought about removing the setup.py
lists and parse the dependencies from the requirements*.txt files.

But then I came across this, https://stackoverflow.com/a/28842733, which
recommends using a `dev` entry in `extras_require` and then using `pip
install -e .[dev]` to install them, which could be easily extended to
also have a `pip install -e .[test]`.

I find this a very clean option, since it reduces the amount of files
the repository and makes setup.py and makes setup.py self-contained.

Are any known drawbacks to this approach? Is it a good way to go?

Regards,

-- 
Carles Sala Cladellas
car...@pythiac.com / +34 666 278 679

https://www.pythiac.com
Pythia Consulting - Data Science as a Service

--
Distutils-SIG mailing list
distutils-sig@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/OQW4VU36WWGESOAYLTV6WWDKX2RKHRD4/