Comments (3)
I have the same problem on Ubuntu 20.04, looks like this code does not completely write file:
InputStream wheelApiResource = ProbeVenvInfoAction.class.getClassLoader()
.getResourceAsStream("templates/wheel-api.py");
byte[] buffer = new byte[wheelApiResource.available()];
wheelApiResource.read(buffer);
File probeDir = new File(project.getBuildDir(), PROBE_DIR_NAME);
probeDir.mkdirs();
OutputStream outStream = new FileOutputStream(getPythonFileForSupportedWheels(probeDir));
outStream.write(buffer);
from pygradle.
Ok, I think I found two solutions to this problem:
First is to use JDK8, problem does not occur there.
Another one patching ./pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/tasks/action/ProbeVenvInfoAction.java with following code:
private static void doProbe(Project project, PythonDetails pythonDetails,
EditablePythonAbiContainer editablePythonAbiContainer) throws IOException {
File probeDir = new File(project.getBuildDir(), PROBE_DIR_NAME);
probeDir.mkdirs();
byte[] buffer = new byte[1024];
try(InputStream wheelApiResource = ProbeVenvInfoAction.class.getClassLoader()
.getResourceAsStream("templates/wheel-api.py");
OutputStream outStream = new FileOutputStream(getPythonFileForSupportedWheels(probeDir))) {
int size;
while((size = wheelApiResource.read(buffer)) > 0) {
outStream.write(buffer, 0, size);
}
}
File supportedAbiFormatsFile = getSupportedAbiFormatsFile(probeDir, pythonDetails);
project.exec(execSpec -> {
execSpec.commandLine(pythonDetails.getVirtualEnvInterpreter());
execSpec.args(getPythonFileForSupportedWheels(probeDir));
execSpec.args(supportedAbiFormatsFile.getAbsolutePath());
});
/*
* The code for this function was originally here.
* Still making this call to benefit AbstractPythonInfrastructureDefaultTask,
* although it's not necessary for InstallVirtualEnvironmentTask because
* GetProbedTagsTask will get the tags.
*/
getSavedTags(pythonDetails, editablePythonAbiContainer, supportedAbiFormatsFile);
}
After recompiling and doing ./gradlew publishPluginMavenPublicationToMavenLocal plugin seem to work fine locally.
from pygradle.
First is to use JDK8, problem does not occur there.
Tried with jdk8 - same issue
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
- 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.