linkedin / linkedin/pygradle

Version should be configurable in plugin

Open
#82 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
603
Forks
142
PR merge metrics
No merged PRs in 30d

Description

The plugin currently uses the hard coded `project.version` which may, in development enviroments, not be compliant with [PEP-0440](https://www.python.org/dev/peps/pep-0440/).

Additionally, in the java/maven world, `-SNAPSHOT` is used for versions while python uses `.preview`.

This problem exposes itself when you try to create an egg as I have done in #78.
The egg for the version `master_2016111701-SNAPSHOT` has its version converted to `master_2016111701_SNAPSHOT` (notice the `-` character has become a `_`).

The result is that the egg has the name `$project.name-$project.version.toString().replace("-", "_")` which is very non-obvious.

The fix to this would be to put the `project.version` in the python plugin's properties but allow the user to override this value.

[Example of location where version is hard coded](https://github.com/linkedin/pygradle/blob/master/pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/tasks/SourceDistTask.java#L58)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/tasks/SourceDistTask.java around line 58, then trace how the Python plugin exposes its properties. Make the version default to project.version while allowing users to override it, and verify that generated egg names preserve the configured Python-compatible version.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.