Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytype setup omits pytype.tools.traces #372

Closed
kamahen opened this issue Aug 5, 2019 · 3 comments
Closed

pytype setup omits pytype.tools.traces #372

kamahen opened this issue Aug 5, 2019 · 3 comments
Assignees
Labels

Comments

@kamahen
Copy link
Contributor

@kamahen kamahen commented Aug 5, 2019

This is with the latest pull from github (2019.7.30). I fixed it by:

cp -pir ./pytype/tools/traces/ ~/.local/lib/python3.6/site-packages/pytype/tools/

Here's the error I got:

Traceback (most recent call last):
  File "/home/peter/.local/bin/pyxref", line 11, in <module>
    load_entry_point('pytype==2019.7.30', 'console_scripts', 'pyxref')()
  File "/home/peter/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/peter/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/home/peter/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/home/peter/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/peter/.local/lib/python3.6/site-packages/pytype/tools/xref/main.py", line 15, in <module>
    from pytype.tools.xref import indexer
  File "/home/peter/.local/lib/python3.6/site-packages/pytype/tools/xref/indexer.py", line 18, in <module>
    from pytype.tools.traces import source
ModuleNotFoundError: No module named 'pytype.tools.traces'
@kamahen
Copy link
Contributor Author

@kamahen kamahen commented Aug 5, 2019

I used these commands to install (I had previously deleted all pytype files from ~/.local):

cd ~/src/pytype
git pull --recurse-submodules
git submodule init
git submodule update
python3 -m pip install --upgrade --user .

Loading

@rchen152
Copy link
Contributor

@rchen152 rchen152 commented Aug 5, 2019

Thanks for catching this; I opened a PR to fix it.

Loading

@rchen152 rchen152 closed this in #373 Aug 7, 2019
@kamahen
Copy link
Contributor Author

@kamahen kamahen commented Aug 7, 2019

Verified fixed.

Loading

pganssle added a commit to pganssle/pytype that referenced this issue Feb 6, 2020
This will prevent further issues like google#372 (though technically google#372
would still have caused a problem because __init__.py was missing).
pganssle added a commit to pganssle/pytype that referenced this issue Feb 6, 2020
This will prevent further issues like google#372 (though technically google#372
would still have caused a problem because __init__.py was missing).
pganssle added a commit to pganssle/pytype that referenced this issue Feb 6, 2020
This will prevent further issues like google#372 (though technically google#372
would still have caused a problem because __init__.py was missing).
pganssle added a commit to pganssle/pytype that referenced this issue Feb 10, 2020
This will prevent further issues like google#372 (though technically google#372
would still have caused a problem because __init__.py was missing).
pganssle added a commit to pganssle/pytype that referenced this issue Feb 10, 2020
This will prevent further issues like google#372 (though technically google#372
would still have caused a problem because __init__.py was missing).
martindemello pushed a commit that referenced this issue Feb 10, 2020
* Replace conditional logic with environment markers

PEP 496 introduced environment markers, which allow you to declare a
dependency conditional on the environment the package is to be installed
into. Among other things, this is useful for cross-compilation.

* Add Python 3.7 to trove classifiers

* Add python_requires matching test matrix

This will prevent `pip` from finding versions of pytype that do not
support a given version of Python. Unfortunately, when no
python_requires declaration is made, the default is "acceptable for all
versions", and so without yanking old versions, `pip install pytype` on
unsupported versions will simply fall back to the latest release without
a `python_requires` declaration. Alas, this still seems like a win.

* Add Python 3.5 to trove classifiers

* Move all static build options into setup.cfg

Using the declarative build file for all your declarative options is
current best practice, since it makes it much easier to parse metadata
from projects without executing arbitrary code.

This will change the minimum required version of setuptools to 30.4,
which was released in December 2016.

* Add pyproject.toml file with build-system

This declares the build system and (Python) dependencies required to
build the project, and will trigger PEP 517 builds when present in pip
installs.

* Add pyproject.toml to MANIFEST.in

This will include pyproject.toml in sdists, which will trigger PEP 517
builds when installing from sdist.

* Add license to build metadata

* Use find_packages to populate the package list

This will prevent further issues like #372 (though technically #372
would still have caused a problem because __init__.py was missing).

* Add project_urls

This allows PyPI to give multiple links to various aspects of the
project. See an example of how this renders on urllib3's PyPI page:
https://pypi.org/project/urllib3/1.25.8/

* Move version into setup.cfg

Importing from a fixed module is a built-in capability of the
declarative build file, so no need to re-invent it ourselves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants