#360 Fix "File 'setup.py' not found" error in readthedocs.org
Merged 5 years ago by clime. Opened 5 years ago by frostyx.

@@ -0,0 +1,5 @@ 

+ # Used solely for building documentation on readthedocs.org

+ # Use this file by running "$ pip install -r requirements.readthedocs.txt"

+ # http://docs.readthedocs.io/en/latest/faq.html#can-i-document-a-python-package-that-is-not-at-the-root-of-my-repository

+ 

+ ./python

file modified
-1
@@ -1,7 +1,6 @@ 

  # Used for when working from a virtualenv.

  # Use this file by running "$ pip install -r requirements.txt"

  

- .

  pytest

  mock

  sphinx

file modified
+3 -1
@@ -17,7 +17,9 @@ 

      'marshmallow',

      'requests',

      'requests-toolbelt',

-     'six'

+     'six',

+     'configparser',

+     'munch',

  ]

  

  __description__ = "Python client for copr service."

Our builds of python package documentation on readthedocs.org stopped working because of

Directory u'.' is not installable. File 'setup.py' not found.

with @clime we figured out that it is because of . in requirements.txt file.

What I did in this PR is renamed python/requirements.txt file to python/requirements.readthedocs.txt because it is used only for readthedocs purposes and also changed the . to ./python because it treats it from the project root directory.

I also needed to disable this check

Install Project:
[ ] Install your project inside a virtualenv using setup.py install

Such build worked fine https://readthedocs.org/projects/python-copr/builds/7609335/

1 new commit added

  • [python] add configparser requirement for readthedocs
5 years ago

1 new commit added

  • [python] add munch requirement for readthedocs
5 years ago

I've also added some requirements, so it is actually possible to generate things with autodoc.

Why the . was needed before? I'm just curious (I haven't seen that so far).
Renaming requirements.txt seems to be pretty non standard, also look
at MANIFEST.in file.

1 new commit added

  • Try to fix it according to documentation
5 years ago

I've updated the PR according to readthedocs FAQ - http://docs.readthedocs.io/en/latest/faq.html#can-i-document-a-python-package-that-is-not-at-the-root-of-my-repository
The build is passing - https://readthedocs.org/projects/python-copr/builds/7613274/

Do you like this version better, @praiskup? I do.
I need to rebase the PR before merging, though.

1 new commit added

  • Move deps to setup.py
5 years ago

Why the . was needed before? I'm just curious (I haven't seen that so far).

Ahaa, I get it now. It was used to avoid duplicating the required packages list (see feab21e). Therefore, requirements.txt install . to install dependencies from setup.py.

Do you like this version better, @praiskup? I do.

Yes, it looks fine to me.

I need to rebase the PR before merging, though.

This is now spread across 4 commits which makes the git-log unusable.
While you are on the rebase, could you please squash them and add the nice
description from this PR into the commit message (and ideally cite the PR id)?

This is now spread across 4 commits which makes the git-log unusable.
While you are on the rebase, could you please squash them and add the nice
description from this PR into the commit message (and ideally cite the PR id)?

Sure. I just didn't want to do it with every commit like a lunetic :-). I needed to push&try whether it works, so rebasing always would be annoying.

rebased onto 76083b7

5 years ago

Thanks. Gj fixing the docs!

Pull-Request has been merged by clime

5 years ago