examples are added to site-packages
See original GitHub issueWhen installing graphene using pip it creates an examples directory in site-packages with the star wars example schema.
I feel like it’s improper to add a base examples directory. Either it should not be added or placed inside the graphene directory.
Steps to reproduce:
Start empty pipenv project
Run pipenv install graphene
In a python file: from examples.starwars.schema import schema
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
What is python's site-packages directory? - Stack Overflow
A Python installation has a site-packages directory inside the module directory. This directory is where user installed packages are dropped.
Read more >site — Site-specific configuration hook — Python 3.11.1 ...
Importing this module will append site-specific paths to the module search path and add a few builtins, unless -S was used. In that...
Read more >Introduction to Packaging
Abstract. This document describes the current state of packaging in Python using Distribution Utilities (“Distutils”) and its extensions from the end-user's ...
Read more >How do I find the location of my Python site-packages directory
Hint: Running pip list --user or pip freeze --user gives you a list of all installed per user site-packages.
Read more >4. Package structure and distribution
From the code examples above, we've added the names a (an integer), ... a site-packages/ directory, which is where Python puts installed packages...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marnixlenoble @jkimbo I’ve found that issue cause in
setup.py
(packages=find_packages(exclude=["tests", "tests.*", "examples"])
) and I was able to fix it by changingexamples
toexamples*
.Unfortunately there seems to be no easy way to make package
examples
an optional dependency when it is in the same repository. Maybe it will be a good idea to separate examples from main package and then it could be added asextras_require={"examples": ["graphene-examples"]}
?Is it even necessary to allow installation of examples or are they here only for documentation purposes?
EDIT: I am also not sure what exclude
"tests"
is supposed to do as all test files are currently also included in package installation.Yep this can be closed now.