linkedin / pygradle

Using Gradle to build Python projects
https://github.com/linkedin/pygradle
Apache License 2.0
586 stars 147 forks source link

Resolve wheel based dependencies #346

Open divaybansal opened 4 years ago

divaybansal commented 4 years ago

We would like to use wheel based artifacts instead of tar for dependency resolution. For some python packages that are dependent on native libraries, it is always better to use wheels since these libraries are bundled together inside a wheel package.

Pivy importer is able to download the wheel file and create ivy based configuration using the below command.

pivy-importer-0.12.10-all.jar --repo /pypi-ivy/repo confluent-kafka:1.5.0:cp37-cp37m-macosx_10_6_intel In our build.gradle we are trying something like below

 python ('wheel:confluent_kafka:1.5.0') {
            exclude module: 'enum34'
            exclude module: 'futures'
}

The problem is resolving the dependency for different environments such as windows/linux/mac. In the above, it will be helpful if we can also provide classifier information "cp37-cp37m-macosx_10_6_intel" similar to the above command as pivy. The classifier can be used to resolve the correct directory path for different environments in ivy artifactory