Comments (4)
looking at the dependencies it seems to be caused by jsonschema:
+--- pypi:connexion:1.0.129
| +--- pypi:jsonschema:2.5.1
| | +--- pypi:argparse:1.4.0
| | +--- pypi:repoze.lru:0.6
| | \--- pypi:functools32:3.2.3-2
Relate issue: python-jsonschema/jsonschema#228 which apparently it should work with Python3, however the problem still appears.
from pygradle.
This happens because the Ivy files do not have the information about the conditional dependencies.
The Python package metadata (when you install in virtualenv) contain the info about functools32
that limits it to be used with Python 2.7 only (environment markers).
We have solved this internally at LinkedIn last summer. We are able to build libraries that: (a) declare support for multiple versions of Python and get built/tested with each such version, and (b) declare the conditional dependencies so that the environment markers are correctly recorded in the Python package metadata.
Unfortunately, we still did not have time to port these two extensions or the changes to the DistGradle class (used in our setup.py) that are needed to support these features in the open-source pygradle. We are going to work on that as other priorities allow.
In the meantime, you could use Gradle's features and Groovy's if
statement to exclude the dependencies based on the version of Python interpreter used for the build. That does not scale well for hundreds of products, but can allow you to build a handful of them with Python 3.
Alternatively (and this scales better), you could use your own package repo, where you could store the packages processed with Python 2 separately from those processed with Python 3. That way, the transitive dependencies will not creep in from Python 2 into Python 3 builds.
Notice that pyvi is only a simple example to get users quickly up-and-running with pygradle. Internally, we use a much more sophisticated Python uploader that can use Python 2 or 3 as needed and a professional artifactory repo with python package index. We use a single repo thanks to the above mentioned extensions that allow us to process conditional dependencies correctly.
from pygradle.
@zvezdan thank you for the answer.
I was thinking more and more of seting up my own artifact repository as I have issues with several dependencies, some which are as wheels and I know there is an open issue about that #46
Meanwhile I was able to built it using the following Gradle construct:
dependencies {
python ('pypi:connexion:1.0.129') {
exclude module: 'functools32'
}
}
There are still some issues which I was not able to solve (a.k.a. did not have time had time to look into) so I cannot say it builds properly, but at least it does not get stuck anymore.
from pygradle.
Closing this as I think it addressed the main question.
from pygradle.
Related Issues (20)
- Can anyone explain this early problem? HOT 1
- 'term:skip-covered' should be used in preference to 'term' HOT 7
- Can we update the documentation to provide a full working example for 2020 onwards. HOT 2
- Build issue with pygradle HOT 1
- How do use Pygradle tasks with a custom virtualenv name.
- Set up a bounty system
- File not found error while executing gunicorn command
- Does PyGradle work with Python3.8 - re.py line 145 enum no attribute IntFlag HOT 2
- Why pygradle uses setuptools-git?
- "Unable to find or execute python" python details set version=3 only works for python3.7 HOT 1
- Resolve wheel based dependencies
- Spotless now integrates with black, but it could be better
- Issue with creating a virtualenv. HOT 3
- Struggling with virtualenv and sys.prefix
- functools32 dependency in installBuildRequirements
- build issue - createVirtualEnvironment -> pygradleBootstrap HOT 7
- pass pexOptions to plugin HOT 1
- Class org.gradle.api.internal.project.DefaultProject_Decorated does not implement the requested interface org.gradle.api.internal.file.FileOperations HOT 4
- Exclude transitive dependency from requirements.txt HOT 1
- Is this project still actively maintained? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygradle.