#996 messaging: add docs/requirements.txt with copr-common
Merged 4 years ago by praiskup. Opened 4 years ago by praiskup.

file modified
+1
@@ -2,4 +2,5 @@

  include MANIFEST.in

  include copr-messaging.spec

  include runtests.sh

+ include requirements.txt

  recursive-include docs/ *

@@ -0,0 +1,2 @@

+ copr-common

+ fedora-messaging

file modified
+4 -5
@@ -30,10 +30,9 @@

  __author_email__ = "copr-devel@lists.fedorahosted.org"

  __url__ = "https://pagure.io/copr/copr"

  

- __requires__ = [

-     'fedora-messaging',

-     'copr-common',

- ]

+ 

+ with open(os.path.join(here, "requirements.txt")) as f:

+     __requires__ = f.read().split("\n")[:-1]

  

  setup(

      name=__name__,
@@ -54,7 +53,7 @@

      packages=find_packages(),

      include_package_data=True,

      zip_safe=False,

-     install_requires=["fedora_messaging"],

+     install_requires=__requires__,

      test_suite="copr_messaging.tests",

      entry_points={

          "fedora.messages": [

This is per read-the-docs build warning:
WARNING: autodoc: failed to import class 'schema.BuildChrootEnded' from
module 'copr_messaging'; the following exception was raised:
No module named 'copr_common'

rebased onto 448f867eb903079b32f0bb03e22e6c1799b6f86a

4 years ago

I temporarily regenerated https://copr-messaging.readthedocs.io/en/latest/api.html from https://pagure.io/fork/praiskup/copr/copr/tree/fix-messaging-doc-generator

We need to flip read-the-docs config back against this repo once this PR is merged.

It quite sucks that those dependencies are already defined in messaging/setup.py. Can we avoid the duplicity somehow?

Imho their are defined incorrectly ... we define __requires variable, but not use it afterward. Looking on cli/setup.py, we pass it as an argument for the setup() function.

install_requires=requires,

Can you please try whether it solves the issue without needing to create the requirements.txt file?

rebased onto 768be6d77a765479e255909a8d321110c049b620

4 years ago

rebased onto 84a4983f094c734093df34bd92256c886f808ecf

4 years ago

Yes, this also looks good to me. Just out of curiosity, simply having those requirements only in setup.py (but fixed as I mentioned above) didn't help?

I haven't tried that, readthedocs is asking me to specify where the requirements.txt is ... do you want to experiment a bit with this?

readthedocs is asking me to specify where the requirements.txt

Aha, in that case, let's keep it this way.
+1

rebased onto e9cc07b

4 years ago

Pull-Request has been merged by praiskup

4 years ago