Skip to content

Don't import vars from setup.py#7

Open
amercader wants to merge 1 commit into
conwetlab:masterfrom
okfn:master
Open

Don't import vars from setup.py#7
amercader wants to merge 1 commit into
conwetlab:masterfrom
okfn:master

Conversation

@amercader

Copy link
Copy Markdown

When using setuptools>=19.4 installation fails with an exception:

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/home/adria/dev/pyenvs/fiware/src/ckanext-oauth2/setup.py", line 25, in <module>

    from ckanext.oauth2 import __version__, __description__

  File "ckanext/__init__.py", line 23, in <module>

    pkg_resources.declare_namespace(__name__)

  File "/home/adria/dev/pyenvs/fiware/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in declare_namespace

    _handle_ns(packageName, path_item)

  File "/home/adria/dev/pyenvs/fiware/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2198, in _handle_ns

    path.sort(key=sort_key)

  File "/home/adria/dev/pyenvs/fiware/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2196, in sort_key

    return sys_path.index(_normalize_cached(os.sep.join(parts)))

ValueError: '/home/adria/dev/pyenvs/fiware/src/ckanext-oauth2' is not in list

This seems to be related with this setuptools issue:

https://bitbucket.org/pypa/setuptools/issues/491/setuptools-194-breaks-pip-install-builds

In any case, it can be avoided removing the imports from setup.py

When using setuptools>=19.4 installation fails with an exception:

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/home/adria/dev/pyenvs/fiware/src/ckanext-oauth2/setup.py", line 25, in <module>

    from ckanext.oauth2 import __version__, __description__

  File "ckanext/__init__.py", line 23, in <module>

    pkg_resources.declare_namespace(__name__)

  File "/home/adria/dev/pyenvs/fiware/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in declare_namespace

    _handle_ns(packageName, path_item)

  File "/home/adria/dev/pyenvs/fiware/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2198, in _handle_ns

    path.sort(key=sort_key)

  File "/home/adria/dev/pyenvs/fiware/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2196, in sort_key

    return sys_path.index(_normalize_cached(os.sep.join(parts)))

ValueError: '/home/adria/dev/pyenvs/fiware/src/ckanext-oauth2' is not in list

This seems to be related with this setuptools issue:

https://bitbucket.org/pypa/setuptools/issues/491/setuptools-194-breaks-pip-install-builds

In any case, it can be avoided removing the imports from setup.py
amercader added a commit to okfn/docker-fiware-ckan that referenced this pull request Jan 29, 2016
Otherwise ckanext-oauth2 installation fails.
See conwetlab/ckanext-oauth2#7 for details
@aitormagan

Copy link
Copy Markdown
Contributor

This bug is solved in setuptools 19.6.2. Anyway, I cannot reproduce the problem. I have installed several versions of setuptools and the installation process (python setup.py install) is working in all of them. Do you still have the same problem?

frafra pushed a commit to COATnor/ckanext-oauth2 that referenced this pull request Mar 31, 2026
* fix: enable test using github actions

* fix: update branch references from master to main in GitHub Actions workflow

* fix: update Python version in GitHub Actions workflow from 2.7 to 3.9

* fix: update GitHub Actions workflow to install Apache Solr and Firefox

* add: geckodriver

* fix: remove install geckodriver

* fix: rename

* fix: disable health check

* fix: enable 2.9.0

* fix: remove allow all external

* fix: force old setuptools

* fix: disable integration tests

* fix: install 75.8.0

* fix: use python 3.8

* fix: force setuptools 57.4

* fix: test

* fix: remove geckodriver setup from tests workflow

* fix: test

* fix: update CKAN installation in tests workflow

* fix: remove solr init

* fix: add postgres password

* fix: try localhost

* fix: pastescript

* init

* fix: enable requirements

* fix: pip install pyutilib

* fix: install ckan dev

* add: flask_babel

* fix: add simplejson

* fix: install requirements

* fix: delete some

* fix: update ckan installation requirements and remove unused packages

* fix: test

* fix: test 3.10

* fix: using matrix

* fix: using 3.11

* add: work around

* install

* fix: force

* install pyyaml

* fix: setuptools

* add: install markdown with no-binary option

* chore: update Python version to 3.10.12 in CI workflow

* chore: simplify CKAN installation in CI workflow

* fix: testing install wheel

* fix: setup setup tools

* fix: test

* Revert "fix: setup setup tools"

This reverts commit 2e11a81.

* Revert "fix: test"

This reverts commit df18c70.

* fix: install ckan package

* fix: setup postgres

* fix: test python 3.9

* fix: force

* fix: force

* fix: update ckan db initialization command in tests workflow

* install extension

* fix: run tests

* chore: remove ckan test configuration from setup.cfg

* chore: comment out test execution in GitHub Actions workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants